SEVN
Loading...
Searching...
No Matches
property.h
Go to the documentation of this file.
1//
2// Created by mario on 09/02/19.
3//
4/*
5Adding a new Property
6
7 As an example we are adding a very simple property the Schwarzwald radius.
8
9* Go to Property.h and add the new class for the property
10
11class Rs : public Property{
12
13};
14
15* Add the public static members ID and obejct instance.
16
17static size_t ID;
18static Rs _rs;
19
20* Add the constructor (it is standard)
21
22Rs(bool reg = true){
23 if(reg) {
24 Register(this, &ID, name());
25 }
26}
27
28* Override the basic public method Instance
29
30Rs * Instance() override {
31return (new Rs(false));
32}
33
34* Override the basic public method name
35
36inline std::string name() const override { return "Rs"; }
37
38* Override the public method evolve, this is the core of the property, it should be defined in property.h, but written in propery.cpp because it depends on the star s that has been only pre-called here (to avoid cross reference).
39
40void evolve(_UNUSED Star *s) override;
41
42* In property.cpp write the evolve function
43
44void Rs::evolve( Star *s){
45
46 set_0(get());
47
48 double rs=2*utilities::G_over_c2*s->getp(Mass::ID); //rs=2GM/c^2
49
50 set(rs);
51}
52NOTE: remember to write set_0(get) at the beginning.
53
54In that case is simple we are just setting rs=2*GM/c^2.
55
56
57 * If needed Override the public method set_remant. How this property change when the star become a remnant? The default set_remant in the class Property set all the values V,V0,value,value0,Dvalue to 0. In our case we don’t want this, rather since Rs, depends just on the mass, we use exactly the same set_remannt of mass
58
59void set_remnant(_UNUSED Star *s) override {
60V0=V;
61value0=value;
62}
63
64* If needed Override the public method changed_track. How this property change when we jump to a new track? The default method in Property does nothing. Since this a property derived from the real value V of the Mass this does not change during the jump we don’t need to override.
65
66
67* Other function to override
68* Special_evolve, if they ave to evolve outside the cycle see ecc. Etc.
69* set_w, only for interpolating property
70* get_ecc only if internally the function is for example in log (see Luminosity)
71
72Add in static_main.h
73
74 * Go in static_main.h and add the static members
75* Add the the ID size_t Rs::ID;
76* Add the static instance
77 Rs Rs::_rs;
78
79NOTE: The position in which we define the static instance is importante, because this is the order they will have during the evolution.
80Therefore NEVER write something after Timestep, and for derived property NEVER write before the property the are derived from , follow the comments in static_main.h
81*/
82
83#ifndef SEVN_PROPERTY_H
84#define SEVN_PROPERTY_H
85
86#include <sevnlog.h>
87#include <iostream>
88#include <vector>
89#include <errhand.h>
90#include <lookup_and_phases.h>
91#include <cmath>
92#include <sevnlog.h>
93#include <utilities.h>
94#include <lambda_base.h>
95#include <lambda_klencki21.h>
96
97using namespace Lookup;
98
99using std::cout;
100using std::endl;
101using std::vector;
103
104
105#define _UNUSED __attribute__ ((unused))
106#define FOR4 for(size_t _i = 0; _i < 4; _i++)
107
108class Star;
109class Staremnant;
110class Binstar;
111
113
114public:
115
116 typedef std::map<std::string,size_t> _PrintMap;
118
120 _size++;
121 value = value0 = Dvalue = V = V0 = 0.0; //NB DO NOT CHANGE THIS
122 }
123
124
125 virtual ~Property(){
126
127 }
128
129 virtual Property * Instance() = 0;
130
131 virtual inline std::string name() const {return "Property (generic)";}
132
133 virtual inline std::string units(){return "UNKOWN";}
134
135
141 virtual inline bool amiderived() { return false;}
142
143 virtual void resynch(_UNUSED const double &dt, _UNUSED bool set0=true) {}
144
145 virtual void resynch(_UNUSED Star *s) {}
146
147 virtual void set_empty(_UNUSED Star *s) {
148 V0=V=std::nan("");
149 value=value0=0;
150 Dvalue=0;
151 }
158 virtual void evolve_empty(_UNUSED Star *s) {
159 set_empty(s);
160 }
161
162 virtual void set_remnant(_UNUSED Star *s){
163
164 V0 = V;
165 value0 = value;
166
167 V=value=0;
168 Dvalue=0;
169 }
176 virtual void evolve_remnant(_UNUSED Star *s){V0=V;}
177 virtual void evolve_nakedco(_UNUSED Star *s){V0=V;}
178
179 //Main evolve function... the sub-(virtual)functions can be adapted for each Property
180 virtual void evolve(_UNUSED Star *s){
181
182 evolve_fake(s);
185
186
187
188 evolve_real();
190
191 safety_check();
192
193 }
194
195
196
197 virtual size_t TabID() { return 0;}
198
199 virtual void special_evolve(_UNUSED Star *s){
200 //cout<<" my special evolve "<<endl;
201 } //if you have some properties that you want to evolve outside the main cycle
202
203
204 virtual void evolve_fake(Star *s);
205
206
207 virtual void init(_UNUSED const double &a) {svlog.critical("Init not allowed for this property",__FILE__,__LINE__,sevnstd::sevnerr(""));}
208
209 virtual void evolve_real(){
210
211 if(value0 == 0.0 && value != 0.0)
212 V = value;
213 else {
214 V0 = V;
215 V = V0 + Dvalue * V0;
216 }
217
218
219
220 //svlog.pdebug("V",V,"V0",V0,"value",value,"value0",value0,"Dvalue",Dvalue,__FILE__,__LINE__);
221 //svlog.pdebug("V",get(),"V0",get_0(),"value",get_fk(),"value0",get_0_fk(),"Dvalue",Dvalue,__FILE__,__LINE__);
222
223 }
224
225 virtual void update_from_binary(_UNUSED Star* s, const double &DV, _UNUSED Binstar *b= nullptr) {
226
227 if (std::isnan(DV) or std::isinf(DV))
228 svlog.critical("Update from Binary of property " +
229 name()+" is nan or infinite",__FILE__,__LINE__);
230
231 V = V + DV;
232
233 };
234
239 virtual void update_derived(_UNUSED Star *s){}
240
241 virtual void copy_V_from(Property *p){
242
243 if (typeid(*p).name() == typeid(*this).name())
244 set(p->get());
245 else
246 svlog.critical("Copying from property " + p->name() + " to property " + this->name() + " is not allowed",__FILE__,__LINE__,sevnstd::sevnerr());
247 }
248
249 virtual inline void update_variation() {
250
251 if (value0 != 0.0)
252 Dvalue = (value - value0) / value0;
253 else
254 Dvalue = 0.0;
255 }
256
259
260 virtual void restore(){
261 V = V0;
262 value = value0;
263 }
264
265 virtual void synch(){
266 V = V0 = value0 = value;
267 }
268
272 virtual inline void reset(){V=V0=value=value0=0;}
273
280 virtual inline void changed_track(_UNUSED Star* s, _UNUSED Star* s_jtrack){};
281
285 virtual inline double get_fk(_UNUSED const Star* s=nullptr) {return value;}
286 virtual inline double get_0_fk(_UNUSED const Star* s=nullptr) {return value0;}
287 virtual inline double get(_UNUSED const Star* s=nullptr) {return V;}
288 virtual inline double get_0(_UNUSED const Star* s=nullptr) {return V0;}
289
290 //Raw get value, with these functions we are sure that the return is always the raw value of V,V0, value and value0
291 //They are not virtual and cannot be changed.
292 inline double get_fk_raw(_UNUSED const Star* s=NULL) const {return value;}
293 inline double get_0_fk_raw(_UNUSED const Star* s=NULL) const {return value0;}
294 inline double get_raw(_UNUSED const Star* s=NULL) const {return V;}
295 inline double get_0_raw(_UNUSED const Star* s=NULL) const {return V0;}
296
303 virtual inline double get_Vlast(_UNUSED const Star* s) const {svlog.critical("get_vend not implemented for property"+
304 name()+".",__FILE__,__LINE__,sevnstd::notimplemented_error()); return 0.;}
305
306 double * get_wm() {return &wM[0];}
307 double * get_wz() {return &wZ[0];}
308
309 virtual void set_w(_UNUSED Star *s){}
310
311 //global properties
312 static inline size_t size() {return _size;}
313 static vector<Property*> all;
314
315 virtual bool are_table_loaded() const {return false;}
316
317
318 //virtual inline void set_refpointers(_UNUSED std::vector<std::vector<std::vector<double>*>> &tables){return;}
319 virtual inline void set_refpointers(_UNUSED Star *s){return;}
320
321
322 double *val_ref[4];
323 double *val_in[4];
324
325
326protected:
327 static size_t _size;
328
330 double V, V0;
331 vector<double> VBIN;
332
334 double wM[4], wZ[2];
335
336 //TODO GI changed the set functions to virtual, since as is the case of get some properties works internally in log, but here we it seesm that we assumed always a non log value, to be checked
337 void set_fk(const double &a) { value = a;}
338 void set_0_fk(const double &a) { value0 = a;}
339 virtual void set(const double &a) { V = a;}
340 virtual void set_0(const double &a) { V0 = a;}
341 void set_VBIN(const size_t &id, const double &a) {VBIN[id] = a;}
342
343 virtual inline void safety_check(){};
344
345
346protected:
347 //TODO, name is not needed because it can be linked directly to the pointer p->name()
348 inline void Register(Property *_p, size_t *id, const std::string &_name){
349 Property::all.push_back(_p);
350 *id = Property::size() - 1;
351 Property::PrintMap.insert(std::pair<std::string,size_t>(_name, *id));
352 svlog.debug("Stellar property " + name() + " registered (Nproperties: " + utilities::n2s(all.size(),__FILE__,__LINE__) + ")");
353 }
355};
356
361class Time_object : virtual public Property{
362
363 inline std::string units() override {return "Myr";}
364
369 inline void copy_V_from(_UNUSED Property *p) override {
370
371 svlog.error("Copy to the Time property " + this->name() + " is not allowed",__FILE__,__LINE__,true,sevnstd::sevnerr());
372 }
373
374 void evolve_remnant(_UNUSED Star *s) override {}
375 void evolve_nakedco(_UNUSED Star *s) override {}
376 virtual void set_empty(_UNUSED Star *s) override {}
377 virtual void evolve_empty(_UNUSED Star *s) override {}
378
379
380};
381
382class Localtime : public Time_object {
383
384 public:
385 Localtime(bool reg = true) {
386 if (reg) {
387 Register(this, &ID, name());
388 }
389 }
390
391 static size_t ID;
393
394 Localtime *Instance() override {
395 return (new Localtime(false));
396 }
397
398 void synch() override {};
399
400 inline void init(const double &a) override {V = V0 = value = value0 = a;}
401
402 inline std::string name() const override { return "Localtime"; }
403
404 //this property evolves outside the main loop
405 inline void evolve(_UNUSED Star *s) override {};
406
407 void set_remnant(_UNUSED Star *s) override {};
408
409 void evolve_remnant(_UNUSED Star *s) override {}
410
411 void special_evolve(_UNUSED Star *s) override;
412
413 inline void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
414
415private:
416
417 };
418
419class Worldtime : public Time_object {
420
421public:
422 Worldtime(bool reg = true) {
423 if (reg) {
424 Register(this, &ID, name());
425 }
426 set(0.0); //worltime always initialized to ZERO... every time a new instance of this class is created!!
427 }
428
429 static size_t ID;
431
432 Worldtime *Instance() override {
433 return (new Worldtime(false));
434 }
435
436 inline std::string name() const override { return "Worldtime"; }
437 void synch() override {};
438
439 inline void set_remnant (_UNUSED Star *s) override {};
440
441
442 //this property evolves outside the main loop
443 void evolve(_UNUSED Star *s) override {}
444 void special_evolve(_UNUSED Star *s) override;
445 void evolve_remnant(_UNUSED Star *s) override {}
446
447private:
448
449};
450
451class Timestep : public Time_object{
452public:
453 Timestep(bool reg = true){
454 if(reg) {
455 Register(this, &ID, name());
456 }
457 set(0.0); //Timestep initialized to 0.0 by default
458 }
459
460 Timestep * Instance() override {
461 return (new Timestep(false));
462 }
463
464 inline std::string name() const override { return "Timestep"; }
465
466 //TODO Dependent on the Compact remnant subtype
467 double timestep_remnant(Star *s);
468 void set_remnant(_UNUSED Star *s) override;
474 void set_remnant_in_bse(_UNUSED Star *s, _UNUSED Binstar *b) override;
475 void evolve_remnant(_UNUSED Star *s) override {set_remnant(s);};
476 void evolve_nakedco(_UNUSED Star *s) override {set_remnant(s);};
477 void set_empty(_UNUSED Star *s) override {set_remnant(s);};
483 void set_empty_in_bse(_UNUSED Star *s, _UNUSED Binstar *b) override;
484 void evolve_empty(_UNUSED Star *s) override {set_remnant(s);};
485
486
487
488 static size_t ID;
490
491
528 inline bool check_repeat(_UNUSED Star*s, const double &m0, const double &m, const double &derivative, const double tstart);
529 //TODO To discuss: Since m0 and m should be related to the same properties can we just use the property ID as input?
530 // Moreover the derivative could be a child class of the property. In this case all the infor are got by the class star.
531 // However we are not really using the star here.
532 //TODO This function does too much stuff. It both check and assigne a new timestep. I think these two operations should be separated or
533 // at least we should change the name in something more informative.
534
542
543 //TODO mass should has already been evolved!!!
556 void evolve(_UNUSED Star *s) override;
557
558 void synch() override {};
559
560 void resynch(const double &dt, bool set0) override {
561 set(dt);
562 if (set0) set_0(get());
563 }
564
565 void resynch(Star *s) override;
566
567 inline void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
568
569protected:
570
577 void check_dt_limits(double &dt, Star *s);
578
584
585private:
586 bool checked_almost_naked=false; //Used in check_repeat_almost_naked
587};
588
589class NextOutput : public Time_object {
590
591public:
592 NextOutput(bool reg = true) {
593 if (reg) {
594 Register(this, &ID, name());
595 }
596 set(1.0e30); //nextoutput is always initialized to a very large number (to avoid multiple prints of the first snapshots)
597 }
598
599 static size_t ID;
601
602 NextOutput *Instance() override {
603 return (new NextOutput(false));
604 }
605
606 inline std::string name() const override { return "NextOutput"; }
607
608 void init(const double &a) {V = V0 = value = value0 = a;}
609
610 //this property evolves outside the main loop
611 inline void evolve(_UNUSED Star *s) override {}
612 void special_evolve(Star *s) override;
613
614 inline void set_remnant (_UNUSED Star *s) override {};
615
616 inline void evolve_remnant (_UNUSED Star *s) override {};
617 void evolve_nakedco(_UNUSED Star *s) override {};
618
619 inline void restore() override {}
620
621
622
623
624private:
625
626};
627
628/******************************************
629 * Table Properties
630 *****************************************/
631class TableProperty : virtual public Property{
632public:
633
634 virtual size_t TabID() const = 0; //Each subclass of TableProperties has to implement this
635
636 void set_refpointers(_UNUSED Star *s) override;
637
638 bool are_table_loaded() const override {return table_loaded;}
639
640 void set_w(_UNUSED Star *s) override;
641
642
643protected:
644
645 virtual void set_wZ(_UNUSED Star *s);
646 virtual void set_wM(_UNUSED Star *s);
647 //Option for set_wM
653 void set_wM_linear(_UNUSED Star *s);
663 void set_wM_log(_UNUSED Star *s);
664
665
666 bool table_loaded=false;
667};
668
669
670/**** Classes about radii ***/
671
675class R_object : virtual public TableProperty{
676
677
678 inline std::string units() override {return "Rsun";}
679
680
685 inline void copy_V_from(Property *p) override {
686
687 if (dynamic_cast<const R_object*>(p) != nullptr){
688 set(p->get());
689 }
690 else
691 svlog.error("Copying from property " + p->name() + " to property " + this->name() + " is not allowed",__FILE__,__LINE__,true,sevnstd::sevnerr());
692 }
693
694
695};
696
697class Radius : public R_object{
698
699public:
700 Radius(bool reg = true){
701 if(reg) {
702 Register(this, &ID, name());
703 }
704 }
705
706 size_t TabID() const override {return _Radius;}
707
708 inline std::string name() const override { return "Radius"; }
709
710 void set_remnant(_UNUSED Star *s) override;
711 void evolve_remnant(_UNUSED Star *s) override;
712
713 static size_t ID;
715
716 Radius * Instance() override {
717 return (new Radius(false));
718 }
719
720 void evolve(_UNUSED Star *s) override;
721 void evolve_fake(Star *s) override;
722 void update_from_binary(_UNUSED Star* s, const double &DV, _UNUSED Binstar *b= nullptr) override;
723
724
725
726 inline double get_fk(_UNUSED const Star* s=NULL) override {return pow(10.0,value);}
727 inline double get_0_fk(_UNUSED const Star* s=NULL) override {return pow(10.0,value0);}
728 inline double get(_UNUSED const Star* s=NULL) override {return pow(10.0, V);}
729 inline double get_0(_UNUSED const Star* s=NULL) override {return pow(10.0, V0);}
730
731 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
732
733protected:
734
735 void set(const double &a) override { V = std::log10(a);}
736 void set_0(const double &a) override { V0 = std::log10(a);}
737 void set_wM(_UNUSED Star *s) override;
738
740
741
742 virtual inline void safety_check(){
743 //TODO Use V<log10(TINY), could be faster.
744 if (get()<utilities::TINY)
745 svlog.critical("The property "+name()+" becomes extremely small. Something is seriously broken.",__FILE__,__LINE__);
746 }
747
748};
749
750
751/**** Classes about Mass ***/
755class Mass_obejct : virtual public TableProperty{
756
757 inline std::string units() override {return "Msun";}
758
763 inline void copy_V_from(Property *p) override {
764
765 if (dynamic_cast<const Mass_obejct*>(p) != nullptr){
766 set(p->get());
767 }
768 else
769 svlog.error("Copying from property " + p->name() + " to property " + this->name() + " is not allowed",__FILE__,__LINE__,true,sevnstd::sevnerr());
770 }
771
772 double get_Vlast(const Star* s) const override;
773
774};
775
776class Mass : public Mass_obejct{
777
778public:
779 Mass(bool reg = true){
780 if(reg) {
781 Register(this, &ID, name());
782 }
783 }
784
785 static size_t ID;
786 static Mass _mass;
787
788 size_t TabID() const override {return _Mass;}
789
790 Mass * Instance() override {
791 return (new Mass(false));
792 }
793
794 inline std::string name() const override { return "Mass"; }
795
796 void set_remnant(Star *s) override;
797
798 void correct_interpolation_errors(_UNUSED Star *s) override;
799
801
802 inline void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
803
804 void update_from_binary(Star* s, const double &DV, _UNUSED Binstar *b) override;
805
806protected:
807
808 virtual inline void safety_check(){
809 if (get()<utilities::TINY)
810 svlog.critical("The property "+name()+" becomes extremely small. Something is seriously broken.",__FILE__,__LINE__);
811 }
812
813};
814
815class MHE : public Mass_obejct {
816
817public:
818 MHE(bool reg = true) {
819 if (reg) {
820 Register(this, &ID, name());
821 }
822 }
823
824 size_t TabID() const override { return _MHE; }
825
826 static size_t ID;
827 static MHE _masshe;
828
829 MHE *Instance() override {
830 return (new MHE(false));
831 }
832
833 inline std::string name() const override { return "MHE"; }
834
835
836 inline void evolve(_UNUSED Star *s);
837
838 void correct_interpolation_errors(_UNUSED Star *s) override;
840
841 void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override;
842
843};
844
845class MCO : public Mass_obejct{
846
847public:
848 MCO(bool reg = true){
849 if(reg) {
850 Register(this, &ID, name());
851 }
852 }
853
854 size_t TabID() const override {return _MCO;}
855
856 static size_t ID;
857 static MCO _massco;
858
859 MCO * Instance() override {
860 return (new MCO(false));
861 }
862
863 inline std::string name() const override { return "MCO"; }
864
865
866
867
868 inline void evolve(_UNUSED Star *s);
869
870
871 void correct_interpolation_errors(_UNUSED Star *s) override;
872
874
875 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
876
877
878};
879
880/*** Other Table properties ***/
881class Phase : public TableProperty{
882
883public:
884 Phase(bool reg = true){
885 if(reg) {
886 Register(this, &ID, name());
887 }
888 }
889
890 static size_t ID;
891 static Phase _phase;
892
893 size_t TabID() const override {return _Phase;}
894
895 Phase * Instance() override {
896 return (new Phase(false));
897 }
898
899 inline std::string name() const override { return "Phase"; }
900 void synch() override {};
901 void set_remnant(_UNUSED Star *s) override {};
902 void set_empty(_UNUSED Star *s) override {
904 }
905 void evolve_empty(_UNUSED Star *s) override {
906 set_empty(s);
907 }
908
909 //this property evolves outside the main loop
910 void special_evolve(_UNUSED Star *s) override;
911
912 inline void evolve(_UNUSED Star *s) override{};
913 void evolve_remnant(_UNUSED Star *s) override {}
914 inline void changed_track(_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
915
916protected:
917
918 void set_wM(Star *s) override;
919
920};
922
923public:
924 Luminosity(bool reg = true){
925 if(reg) {
926 Register(this, &ID, name());
927 }
928 }
929
930 static size_t ID;
932
933 size_t TabID() const override {return _Lumi;}
934
935 inline std::string name() const override { return "Luminosity"; }
936
937 void set_remnant(_UNUSED Star *s) override;
938 void evolve_remnant(_UNUSED Star *s) override;
939
940 Luminosity * Instance() override {
941 return (new Luminosity(false));
942 }
943
944 inline double get_fk(_UNUSED const Star* s=NULL) override {return pow(10.0,value);}
945 inline double get_0_fk(_UNUSED const Star* s=NULL) override {return pow(10.0,value0);}
946 inline double get(_UNUSED const Star* s=NULL) override {return pow(10.0, V);}
947 inline double get_0(_UNUSED const Star* s=NULL) override {return pow(10.0, V0);}
948 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
949
950protected:
951
952 void set_wM(Star *s) override;
953
954
955};
956
957
958/*** Optional tables ***/
960
961public:
962
963 void set_refpointers(_UNUSED Star *s) override;
964
965 void evolve(Star *s) override {
966
967 if (table_loaded){
969 } else{
971 }
972
973 }
974 //NOTICE: VEry important! It tables are not loaded this property is de-facto as a derived property
975 inline bool amiderived() override { return !table_loaded;}
979 void update_derived(Star *s) override;
980 virtual void synch() override{
981
982 if (table_loaded)
984 else
985 value = value0 = V0 = V;
986 }
987
988protected:
989
990 virtual inline void evolve_without_table(_UNUSED Star *s){return;}
991
993 value0=V0;
994 value=V;
995 }
996};
997
1000
1001public:
1002 Inertia(bool reg = true){
1003 if(reg) {
1004 Register(this, &ID, name());
1005 }
1006 }
1007
1008 static size_t ID;
1010
1011 size_t TabID() const override {return _Inertia;}
1012
1013 Inertia * Instance() override {
1014 return (new Inertia(false));
1015 }
1016
1017
1018 void set_refpointers(_UNUSED Star *s) override;
1019
1020 void set_remnant(_UNUSED Star *s) override;
1021 void evolve_remnant(_UNUSED Star *s) override;
1022 void evolve_nakedco(_UNUSED Star *s) override;
1023
1029
1030
1031 inline std::string name() const override { return "Inertia"; }
1032
1033 inline double get_fk(_UNUSED const Star* s=NULL) override {return pow(10.0,value);}
1034 inline double get_0_fk(_UNUSED const Star* s=NULL) override {return pow(10.0,value0);}
1035 inline double get(_UNUSED const Star* s=NULL) override {return pow(10.0, V);}
1036 inline double get_0(_UNUSED const Star* s=NULL) override {return pow(10.0, V0);}
1037 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1038
1046 double estimate_Inertia_homogeneous_sphere(double Mass,double Outer_radius, double Inner_radius=0.);
1047
1048protected:
1049
1050 inline void evolve_without_table(_UNUSED Star *s) override;
1051
1057 double estimate_logInertia(_UNUSED Star *s);
1083
1084 void set_wM(Star *s) override;
1085
1087
1088private:
1089
1090 double (Inertia::*inertia_func)(_UNUSED Star* s) = nullptr; //Pointer to the inertia func, set in set_refpointers
1092
1093};
1094
1097
1098protected:
1099
1107 virtual inline double estimate_Rcore(double Mcore, double scale_factor){
1108
1109 double norm = scale_factor * 1.1685; //1.1685 is the inverse value of the function at M=1 not considering the scale factor
1110 double M3 = Mcore*Mcore*Mcore;
1111
1112 return norm*std::pow(Mcore,4.6) / ( Mcore*M3 + 0.162*M3 + 0.0065 );
1113
1114 }
1115
1116};
1117
1118class RHE : public CoreRadius {
1119
1120public:
1121 RHE(bool reg = true) {
1122 if (reg) {
1123 Register(this, &ID, name());
1124 }
1125 }
1126
1127 static size_t ID;
1128 static RHE _rhe;
1129
1130 size_t TabID() const override {return _RHE;}
1131
1132 RHE *Instance() override {
1133 return (new RHE(false));
1134 }
1135
1136 void set_refpointers(_UNUSED Star *s) override;
1137
1138 inline std::string name() const override { return "RHE"; }
1139
1140
1141 inline void evolve(_UNUSED Star *s);
1142
1143
1144 void correct_interpolation_errors(_UNUSED Star *s) override;
1146
1147 inline void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1148
1149
1150protected:
1151
1152 void evolve_without_table(_UNUSED Star *s) override;
1153
1154 double estimate_Rcore(_UNUSED Star *s);
1155
1156};
1157
1158class RCO : public CoreRadius {
1159
1160public:
1161 RCO(bool reg = true) {
1162 if (reg) {
1163 Register(this, &ID, name());
1164 }
1165 }
1166
1167 static size_t ID;
1168 static RCO _rco;
1169
1170 size_t TabID() const override {return _RCO;}
1171
1172 RCO *Instance() override {
1173 return (new RCO(false));
1174 }
1175
1176
1177 void set_refpointers(_UNUSED Star *s) override;
1178
1179
1180 inline std::string name() const override { return "RCO"; }
1181
1182
1183 inline void evolve(_UNUSED Star *s);
1184
1185
1186 void correct_interpolation_errors(_UNUSED Star *s) override;
1188 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1189
1190
1191protected:
1192
1193 void evolve_without_table(_UNUSED Star *s) override;
1194 double estimate_Rcore(_UNUSED Star *s);
1195
1196};
1197
1200public:
1201
1202 void set_refpointers(_UNUSED Star *s) override;
1203
1204};
1205
1209
1210public:
1211 Hsup(bool reg = true){
1212 if(reg) {
1213 Register(this, &ID, name());
1214 }
1215 }
1216
1217 static size_t ID;
1218 static Hsup _hsup;
1219
1220 size_t TabID() const override {return _Hsup;}
1221
1222 Hsup * Instance() override {
1223 return (new Hsup(false));
1224 }
1225
1226 inline std::string name() const override { return "Hsup"; }
1227
1228 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1229
1230
1231};
1235
1236public:
1237 HEsup(bool reg = true){
1238 if(reg) {
1239 Register(this, &ID, name());
1240 }
1241 }
1242
1243 static size_t ID;
1245
1246 size_t TabID() const override {return _HEsup;}
1247
1248 HEsup * Instance() override {
1249 return (new HEsup(false));
1250 }
1251
1252 inline std::string name() const override { return "HEsup"; }
1253
1254 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1255
1256
1257};
1261
1262public:
1263 Csup(bool reg = true){
1264 if(reg) {
1265 Register(this, &ID, name());
1266 }
1267 }
1268
1269 static size_t ID;
1270 static Csup _csup;
1271
1272 size_t TabID() const override {return _Csup;}
1273
1274 Csup * Instance() override {
1275 return (new Csup(false));
1276 }
1277
1278 inline std::string name() const override { return "Csup"; }
1279
1280 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1281
1282
1283};
1287
1288public:
1289 Nsup(bool reg = true){
1290 if(reg) {
1291 Register(this, &ID, name());
1292 }
1293 }
1294
1295 static size_t ID;
1296 static Nsup _nsup;
1297
1298 size_t TabID() const override {return _Nsup;}
1299
1300 Nsup * Instance() override {
1301 return (new Nsup(false));
1302 }
1303
1304 inline std::string name() const override { return "Nsup"; }
1305
1306 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1307
1308
1309};
1313
1314public:
1315 Osup(bool reg = true){
1316 if(reg) {
1317 Register(this, &ID, name());
1318 }
1319 }
1320
1321 static size_t ID;
1322 static Osup _osup;
1323
1324 size_t TabID() const override {return _Osup;}
1325
1326 Osup * Instance() override {
1327 return (new Osup(false));
1328 }
1329
1330 inline std::string name() const override { return "Osup"; }
1331
1332 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1333
1334
1335};
1336
1339
1340public:
1341 void set_refpointers(_UNUSED Star *s) override;
1342
1343};
1344
1348class Qconv : public ConvectiveTable{
1349
1350public:
1351 Qconv(bool reg = true){
1352 if(reg) {
1353 Register(this, &ID, name());
1354 }
1355 }
1356
1357 static size_t ID;
1359
1360 size_t TabID() const override {return _Qconv;}
1361
1362 Qconv * Instance() override {
1363 return (new Qconv(false));
1364 }
1365
1366 inline std::string name() const override { return "Qconv"; }
1367
1368 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1369
1370
1371protected:
1372
1378 void evolve_without_table(_UNUSED Star *s) override;
1379
1380 double estimate_Qconv(_UNUSED Star *s);
1381
1382};
1385class Tconv : public ConvectiveTable{
1386
1387public:
1388 Tconv(bool reg = true){
1389 if(reg) {
1390 Register(this, &ID, name());
1391 }
1392 }
1393
1394 static size_t ID;
1396
1397 size_t TabID() const override {return _Tconv;}
1398
1399 Tconv * Instance() override {
1400 return (new Tconv(false));
1401 }
1402
1403 inline std::string name() const override { return "Tconv"; }
1404
1405 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1406
1407
1408};
1414
1415public:
1416 Depthconv(bool reg = true){
1417 if(reg) {
1418 Register(this, &ID, name());
1419 }
1420
1421 }
1422
1423 static size_t ID;
1425
1426 size_t TabID() const override {return _Depthconv;}
1427
1428 Depthconv * Instance() override {
1429 return (new Depthconv(false));
1430 }
1431
1432 inline std::string name() const override { return "Depthconv"; } //to multiply with the stellar radius!
1433
1434 void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1435protected:
1436
1442 void evolve_without_table(_UNUSED Star *s) override;
1443
1444 double estimate_Dconv(_UNUSED Star *s);
1445
1446};
1447/******************************************/
1448
1449/*** Other non tab properties ***/
1450
1451class Bmag : public Property{
1452
1453public:
1454 Bmag(bool reg=true){
1455 if (reg){
1456 Register(this,&ID,name());
1457 }
1458 V=V0=value=value0=0;
1459 }
1460 static size_t ID;
1461 static Bmag _bmag;
1462 inline std::string name() const override {return "Bmag";}
1463 virtual inline std::string units(){return "Gauss";}
1464
1465 Bmag *Instance() override{
1466 return new Bmag(false);
1467 }
1468
1469 void evolve(_UNUSED Star *s) override;
1470
1471 void set_remnant(_UNUSED Star *s) override;
1472 void evolve_remnant(_UNUSED Star *s) override;
1473
1474};
1475
1476class OmegaRem : public Property{
1477public:
1478 OmegaRem(bool reg=true){
1479 if (reg){
1480 Register(this,&ID,name());
1481 }
1482 V=V0=value=value0=std::nan("");
1483 }
1484 static size_t ID;
1486 inline std::string name() const override {return "OmegaRem";}
1487 virtual inline std::string units(){return "s^-1";}
1488
1489 OmegaRem *Instance() override{
1490 return new OmegaRem(false);
1491 }
1492
1493 //Do nothing when evolve
1494 void evolve(_UNUSED Star *s) override {};
1495
1496 //Here do stuff
1497 void set_remnant(_UNUSED Star *s) override;
1498 void evolve_remnant(_UNUSED Star *s) override;
1499
1500};
1501
1502class RemnantType : public Property{
1503
1504public:
1505 RemnantType(bool reg = true){
1506 if(reg) {
1507 Register(this, &ID, name());
1508 }
1509 set(Lookup::Remnants::NotARemnant); //initialize to not-a-remnant
1510 }
1511
1512 static size_t ID;
1514
1515
1516 RemnantType * Instance() override {
1517 return (new RemnantType(false));
1518 }
1519
1520 inline std::string name() const override { return "RemnantType"; }
1521 void synch() override {};
1522
1523 //this property evolves outside the main loop
1524 void set_remnant(_UNUSED Star *s) override;
1525
1526 void set_empty(_UNUSED Star *s) override;
1527 void evolve_empty(_UNUSED Star *s) override {set_empty(s);}
1528
1529 inline void evolve(_UNUSED Star *s) override;
1530
1531};
1532
1540
1541public:
1542
1543
1544 dMcumul_binary(bool reg = true){
1545 if(reg) {
1546 Register(this, &ID, name());
1547 value = value0 = Dvalue = V = V0 = 0.0; //The Property constructor already set this so to 0. But just to be sure for future changes.
1548 }
1549
1550 }
1551
1553 return (new dMcumul_binary(false));
1554 }
1555
1556 inline std::string name() const override { return "dMcumul_binary"; }
1557
1558
1559 //Static definitions
1560 static size_t ID;
1562
1563
1564 inline void evolve(_UNUSED Star *s) override {V0=V;}
1565 inline void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override{V=V0=value=value0=0;}
1566
1567
1568
1569};
1570
1575class dMcumul_RLO : public Property{
1576public:
1577
1578 dMcumul_RLO(bool reg = true){
1579 if(reg) {
1580 Register(this, &ID, name());
1581 value = value0 = Dvalue = V = V0 = 0.0; //The Property constructor already set this so to 0. But just to be sure for future changes.
1582 }
1583
1584 }
1585
1586 dMcumul_RLO * Instance() override {
1587 return (new dMcumul_RLO(false));
1588 }
1589
1590 inline std::string name() const override { return "dMcumul_RLO"; }
1591
1592
1593
1594 //Static definitions
1595 static size_t ID;
1597
1598 inline void evolve(_UNUSED Star *s) override {V0=V;}
1599 //changed_track do nothing same as the base changed_track
1600
1601 void update_from_binary(_UNUSED Star* s, const double &DV, _UNUSED Binstar *b) override;
1602
1603
1604};
1605
1606
1611public:
1612
1613 dMcumulacc_wind(bool reg = true){
1614 if(reg) {
1615 Register(this, &ID, name());
1616 value = value0 = Dvalue = V = V0 = 0.0; //The Property constructor already set this so to 0. But just to be sure for future changes.
1617 }
1618
1619 }
1620
1622 return (new dMcumulacc_wind(false));
1623 }
1624
1625 inline std::string name() const override { return "dMcumulacc_wind"; }
1626
1627
1628
1629 //Static definitions
1630 static size_t ID;
1632
1633 inline void evolve(_UNUSED Star *s) override {V0=V;}
1634 //changed_track do nothing same as the base changed_track
1635};
1636
1643class AngMomSpin : public Property{
1644public:
1645 AngMomSpin(bool reg=true){
1646 if(reg) {
1647 Register(this, &ID, name());
1648 }
1649 }
1650
1651 inline std::string name() const override { return "AngMomSpin"; }
1652 inline std::string units() override {return "Msun Rsun^2 yr^-1";}
1653
1654 //Angmom is set at the star initialisation (through spin)
1655 inline void init(const double &a) override {V = V0 = value = value0 = a;}
1656 static size_t ID;
1658
1659 AngMomSpin * Instance() override {
1660 return (new AngMomSpin(false));
1661 }
1662
1663 void evolve(_UNUSED Star *s) override;
1670 void changed_track(_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1671
1672
1673protected:
1674 double evolve_angmom(_UNUSED Star *s);
1675};
1676
1677
1678
1679
1680
1681/******************************************
1682 * Derived Properties
1683 *****************************************/
1684
1688class Derivative_Property : virtual public Property{
1689
1694 inline void copy_V_from(_UNUSED Property *p) override {
1695
1696 svlog.error("Copy to the Derived property " + this->name() + " is not allowed",__FILE__,__LINE__,true,sevnstd::sevnerr());
1697 }
1698};
1699
1701
1702public:
1703
1704 dMdt(bool reg = true){
1705 if(reg) {
1706 Register(this, &ID, name());
1707 }
1708 }
1709
1710 inline std::string name() const override { return "dMdt"; }
1711 inline std::string units() override {return "Msun/Myr";}
1712
1713
1714 static size_t ID;
1715 static dMdt _dmdt;
1716
1717 dMdt * Instance() override {
1718 return (new dMdt(false));
1719 }
1720
1721 //void synch() override {};
1722
1723 void evolve(_UNUSED Star *s) override;
1724
1725};
1726
1728
1729public:
1730
1731 dMHEdt(bool reg = true){
1732 if(reg) {
1733 Register(this, &ID, name());
1734 }
1735 }
1736
1737 static size_t ID;
1739
1740 inline std::string name() const override { return "dMHEdt"; }
1741 inline std::string units() override {return "Msun/Myr";}
1742
1743
1744 dMHEdt * Instance() override {
1745 return (new dMHEdt(false));
1746 }
1747
1748 //void synch() override {};
1749
1750 void evolve(_UNUSED Star *s) override;
1751
1752};
1753
1755
1756public:
1757
1758 dMCOdt(bool reg = true){
1759 if(reg) {
1760 Register(this, &ID, name());
1761 }
1762 }
1763
1764 static size_t ID;
1766
1767 inline std::string name() const override { return "dMCOdt"; }
1768 inline std::string units() override {return "Msun/Myr";}
1769
1770
1771 dMCOdt * Instance() override {
1772 return (new dMCOdt(false));
1773 }
1774
1775 //void synch() override {};
1776
1777 void evolve(_UNUSED Star *s) override;
1778
1779};
1780
1782
1783public:
1784
1785 dRdt(bool reg = true){
1786 if(reg) {
1787 Register(this, &ID, name());
1788 }
1789 }
1790
1791 dRdt * Instance() override {
1792 return (new dRdt(false));
1793 }
1794
1795 inline std::string name() const override { return "dRdt"; }
1796 inline std::string units() override {return "Rsun/Myr";}
1797
1798
1799 static size_t ID;
1800 static dRdt _drdt;
1801
1802 //void synch() override {};
1803
1804 void evolve(_UNUSED Star *s) override;
1805
1806};
1807
1808/*** Derived properties ***/
1809
1813class Derived_Property : virtual public Property{
1814
1819 inline void copy_V_from(_UNUSED Property *p) override {
1820
1821 svlog.error("Copy to the Derived property " + this->name() + " is not allowed",__FILE__,__LINE__,true,sevnstd::sevnerr());
1822 }
1823
1824 virtual inline bool amiderived() { return true;}
1825
1826 //A bit different synch for derived, since value and value0 are always 0.
1827 void synch() override {
1828 value=value0=V0=V;
1829 };
1830
1831
1832
1833 //For the derived property when set_remnant or evolve_remnant is called just run evolve to set the proper value
1841 void update_derived(Star *s) override;
1842};
1844
1845public:
1846
1847 Temperature(bool reg = true){
1848 if(reg) {
1849 Register(this, &ID, name());
1850 }
1851 }
1852
1853 Temperature * Instance() override {
1854 return (new Temperature(false));
1855 }
1856
1857 inline std::string name() const override { return "Temperature"; }
1858 inline std::string units() override {return "K";}
1859
1860 static size_t ID;
1862
1863 //TODO mass should has already been evolved!!!
1864 void evolve(_UNUSED Star *s) override;
1865
1866 inline void changed_track (_UNUSED Star* s, _UNUSED Star* s_jtrack) override;
1867
1868};
1869
1870class Rs : public Derived_Property{
1871
1872public:
1873
1874 static size_t ID;
1875 static Rs _rs;
1876
1877 Rs(bool reg = true){
1878 if(reg) {
1879 Register(this, &ID, name());
1880 }
1881 }
1882 Rs * Instance() override {
1883 return (new Rs(false));
1884 }
1885 inline std::string name() const override { return "Rs"; }
1886 inline std::string units() override {return "Rsun";}
1887
1888 //TODO mass should has already been evolved!!!
1889 void evolve(_UNUSED Star *s) override;
1890
1891};
1892
1898
1899public:
1900
1901 OmegaSpin(bool reg=true){
1902 if(reg) {
1903 Register(this, &ID, name());
1904 }
1905 }
1906
1907 inline std::string name() const override { return "OmegaSpin"; }
1908 inline std::string units() override {return "yr^-1";}
1909
1910 //Spin is set at the star initialisation
1911 inline void init(const double &a) override {V = V0 = value = value0 = a;}
1912 static size_t ID;
1914
1915 OmegaSpin * Instance() override {
1916 return (new OmegaSpin(false));
1917 }
1918
1919 void evolve(_UNUSED Star *s) override;
1920 void changed_track(Star* s, _UNUSED Star* s_jtrack) override { evolve(s);}
1921
1922};
1923
1927class Spin : public Derived_Property{
1928
1929public:
1930 static size_t ID;
1931 static Spin _spin;
1932
1933 Spin(bool reg = true){
1934 if(reg) {
1935 Register(this, &ID, name());
1936 }
1937 }
1938
1939 Spin * Instance() override {
1940 return (new Spin(false));
1941 }
1942 inline std::string name() const override { return "Spin"; }
1943 inline std::string units() override {return "";}
1944
1945 //Classica synch here, since we initialise it with init
1946 void synch() override {
1947 V=V0=value=value0;
1948 };
1949
1950 //Spin is set at the star initialisation
1951 inline void init(const double &a) override {V = V0 = value = value0 = a;}
1952
1953 void evolve(_UNUSED Star *s) override;
1954 void changed_track(Star* s, _UNUSED Star* s_jtrack) override { evolve(s);}
1955
1956
1965 static double Spin_from_OmegaSpin(double OmegaSpin, double Mass, double Radius);
1966
1967};
1968
1974
1975public:
1976
1977 Xspin(bool reg = true){
1978 if(reg){
1979 Register(this, &ID, name());
1980 }
1981 V=V0=value=value0=std::nan("");
1982 }
1983
1984 static size_t ID;
1986
1987 Xspin * Instance() override {
1988 return (new Xspin(false));
1989 }
1990
1991 inline std::string name() const override {return "Xspin";}
1992 inline void evolve (_UNUSED Star *s) override {};
1993 void set_remnant(_UNUSED Star *s) override;
1994 void evolve_remnant(_UNUSED Star *s) override;
1995
1996};
1997
1998
1999/******************************************
2000 * JIT Properties
2001 *****************************************/
2002
2009
2010public:
2011
2012 inline std::string name() const override { return "Generic JIT Property"; }
2013
2014 //Special evolve
2015 void evolve(_UNUSED Star *s) override {
2016 evolve_number++;
2017 }
2018 void update_from_binary(_UNUSED Star* s, _UNUSED const double &DV, _UNUSED Binstar *b) override{
2019 evolve_number++;
2020 }
2021
2022 //Do nothing here, empty is already handled in get
2023 void set_empty(_UNUSED Star *s) override {}
2024 void evolve_empty(_UNUSED Star *s) override {}
2025
2026 void set_remnant(_UNUSED Star *s) override {evolve(s);}
2027 void evolve_remnant(_UNUSED Star *s) override {evolve(s);}
2028 void evolve_nakedco(_UNUSED Star *s) override {evolve(s);}
2030 void update_derived(_UNUSED Star *s) override{};
2031
2032 virtual void restore() override {}
2033 virtual void synch() override {}
2034
2035
2036 //Disable calling some get methods (only get is important for JIT properties)
2037 inline double get_fk(_UNUSED const Star* s=NULL) override {
2038 svlog.critical("get_fk for Property "+name()+" should not be called",__FILE__,__LINE__,sevnstd::notimplemented_error());
2039 return -1.0;
2040 }
2041 inline double get_0_fk(_UNUSED const Star* s=NULL) override {
2042 svlog.critical("get_0_fk for Property "+name()+" should not be called",__FILE__,__LINE__,sevnstd::notimplemented_error());
2043 return -1.0;
2044 }
2045 inline double get_0(_UNUSED const Star* s=NULL) override {
2046 svlog.critical("get_0 for Property "+name()+" should not be called",__FILE__,__LINE__,sevnstd::notimplemented_error());
2047 return -1.0;
2048 }
2049
2050
2051protected:
2052
2054
2056 }
2057
2058 void set(const double &a) override {
2059 V = a;
2061 }
2062 //virtual void set_0(const double &a) { V0 = a;}
2063
2064
2065
2066private:
2067
2068
2069 //The following numbers check if an evolution of a binary evolution has been called
2070 //from the last time this property has been estimated.
2071 //evolve_number increases by 1 each time evolve or update_from_binary has been called.
2072 //last_evolve_number stores the value of evolve_number when getp is called.
2073 //When calling getp it checks if the two numbers are equal, if they are the property is just last stored one.
2075
2076};
2077
2078class Lambda : public JIT_Property{
2079
2080public:
2081
2082 static size_t ID;
2084
2085 Lambda(bool reg = true){
2086 if(reg) {
2087 Register(this, &ID, name());
2088 }
2089 }
2090 Lambda * Instance() override {
2091 return (new Lambda(false));
2092 }
2093 inline std::string name() const override { return "Lambda"; }
2094 inline std::string units() override {return "Number";}
2095
2096 void set_remnant(_UNUSED Star *s) override {V=std::nan("");}
2097 void evolve_remnant(_UNUSED Star *s) override {V=std::nan("");}
2098 void evolve_nakedco(_UNUSED Star *s) override {V=std::nan("");}
2099
2111 double get(_UNUSED const Star* s=NULL) override;
2112
2113
2114protected:
2126 double estimate_lambda (const Star *star);
2127
2128private:
2136 double estimate_lambda_BSE (const Star *star, bool whole_cenv=false, bool m0_as_hurley=false);
2137
2146 double estimate_lambda_Parsec (const Star *star);
2147
2155 double estimate_lambda_Claeys14(const Star *star, bool whole_cenv=false);
2156
2165 double estimate_lambda_Izzard04(const Star *star, bool whole_cenv=false);
2166
2180 double estimate_lambda_Klencki21(const Star *star, bool interpolate=false);
2181
2200 double estimate_lambda_Nanjing(const Star *star, bool interpolate=false);
2201
2203 double Mzams_cachedM=0, Zmet_cachedM=0, M0_cached=0; //Cached values for the function get_M0_BSE
2204 double Mzams_cachedR=0, Zmet_cachedR=0, Rzams_cached=0; //Cached values for the function get_Rzams
2205
2207 bool first_call=true;
2208 std::unique_ptr<Lambda_Base> lambda_base_ptr;
2217 double get_M0_BSE(const Star *s);
2225 double get_Rzams(const Star *s);
2226
2227
2228
2229};
2230
2232class Ebind : public JIT_Property{
2233
2234public:
2235 static size_t ID;
2237
2238 Ebind(bool reg = true){
2239 if(reg) {
2240 Register(this, &ID, name());
2241 }
2242 }
2243 Ebind * Instance() override {
2244 return (new Ebind(false));
2245 }
2246 inline std::string name() const override { return "Ebind"; }
2247 inline std::string units() override {return "Msun^2/R/G";}
2248
2249 void set_remnant(_UNUSED Star *s) override {V=0.;}
2250 void evolve_remnant(_UNUSED Star *s) override {V=0.;}
2251 void evolve_nakedco(_UNUSED Star *s) override {V=0.;}
2252
2258 double get(_UNUSED const Star* s=NULL) override;
2259
2260};
2261
2263class PhaseBSE : public JIT_Property{
2264
2265public:
2266 static size_t ID;
2268
2269 PhaseBSE(bool reg = true){
2270 if(reg) {
2271 Register(this, &ID, name());
2272 }
2273 }
2274 PhaseBSE * Instance() override {
2275 return (new PhaseBSE(false));
2276 }
2277 inline std::string name() const override { return "PhaseBSE"; }
2278 inline std::string units() override {return "";}
2279
2280 double get(_UNUSED const Star* s=NULL) override;
2281};
2282
2283//zams
2284class Zams : public JIT_Property{
2285
2286public:
2287 static size_t ID;
2288 static Zams _zams;
2289
2290 Zams(bool reg = true){
2291 if(reg) {
2292 Register(this, &ID, name());
2293 }
2294 }
2295 Zams * Instance() override {
2296 return (new Zams(false));
2297 }
2298 inline std::string name() const override { return "Zams"; }
2299 inline std::string units() override {return "Msun";}
2300
2301 void set_remnant(_UNUSED Star *s) override {}
2302 void evolve_remnant(_UNUSED Star *s) override {}
2303 void evolve_nakedco(_UNUSED Star *s) override {}
2304
2305 double get(_UNUSED const Star* s=NULL) override;
2306};
2307
2308//Z
2309class Zmet : public JIT_Property{
2310
2311public:
2312 static size_t ID;
2313 static Zmet _zmet;
2314
2315 Zmet(bool reg = true){
2316 if(reg) {
2317 Register(this, &ID, name());
2318 }
2319 }
2320 Zmet * Instance() override {
2321 return (new Zmet(false));
2322 }
2323 inline std::string name() const override { return "Zmet"; }
2324 inline std::string units() override {return "";}
2325
2326 void set_remnant(_UNUSED Star *s) override {}
2327 void evolve_remnant(_UNUSED Star *s) override {}
2328 void evolve_nakedco(_UNUSED Star *s) override {}
2329
2330 double get(_UNUSED const Star* s=NULL) override;
2331
2332
2333};
2334
2335//Event
2336class Event : public JIT_Property{
2337public:
2338 static size_t ID;
2340
2341 Event(bool reg = true){
2342 if(reg) {
2343 Register(this, &ID, name());
2344 }
2346 }
2347
2348 Event * Instance() override {
2349 return (new Event(false));
2350 }
2351 inline std::string name() const override { return "Event"; }
2352 double get(_UNUSED const Star* s=NULL) override;
2353
2354private:
2355 bool is_qhe_set = false;
2356};
2357
2363class dMRLOdt : public JIT_Property{
2364
2365public:
2366 static size_t ID;
2368 dMRLOdt(bool reg = true){
2369 if(reg) {
2370 Register(this, &ID, name());
2371 }
2372 }
2373 dMRLOdt * Instance() override {
2374 return (new dMRLOdt(false));
2375 }
2376
2377 inline std::string name() const override { return "dMRLOdt"; }
2378 inline std::string units() override {return "Msun/Myr";}
2379
2380 double get(_UNUSED const Star* s=NULL) override;
2381
2382};
2383
2388
2389public:
2390 static size_t ID;
2392 dMaccwinddt(bool reg = true){
2393 if(reg) {
2394 Register(this, &ID, name());
2395 }
2396 }
2397 dMaccwinddt * Instance() override {
2398 return (new dMaccwinddt(false));
2399 }
2400
2401 inline std::string name() const override { return "dMaccwinddt"; }
2402 inline std::string units() override {return "Msun/Myr";}
2403
2404 double get(_UNUSED const Star* s=NULL) override;
2405};
2406
2407
2408
2409
2410//alpha angle
2411//TODO I put this property just to retrieve quickly this property for the Cecilia's work, but this information is already present
2412//in the logfile and the property should be removed.
2417class NSsalpha : public JIT_Property{
2418
2419 static size_t ID;
2421 NSsalpha(bool reg = true){
2422 if(reg) {
2423 Register(this, &ID, name());
2424 }
2425 }
2426 NSsalpha * Instance() override {
2427 return (new NSsalpha(false));
2428 }
2429
2430 inline std::string name() const override { return "NSsalpha"; }
2431 inline std::string units() override {return "";}
2432
2433 void evolve(_UNUSED Star *s) override {}
2434 void set_remnant(_UNUSED Star *s) override;
2435
2436 double get(_UNUSED const Star* s=NULL) override{return sinalpha;}
2437
2438protected:
2439
2440 double sinalpha=std::nan("");
2441};
2442
2443
2448class Plife : public JIT_Property{
2449
2450public:
2451 static size_t ID;
2453 explicit Plife(bool reg = true){
2454 if(reg) {
2455 Register(this, &ID, name());
2456 }
2457 }
2458 Plife * Instance() override {
2459 return (new Plife(false));
2460 }
2461
2462 inline std::string name() const override { return "Plife"; }
2463 inline std::string units() override {return "";}
2464
2465 void set_remnant(_UNUSED Star *s) override {V=0.;}
2466 double get(_UNUSED const Star* s=NULL) override;
2467
2468
2469
2470};
2471
2472
2473
2474#endif //SEVN_PROPERTY_H
2475
2476/******************************************/
Definition: property.h:1643
std::string units() override
Definition: property.h:1652
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1936
static size_t ID
Definition: property.h:1656
static AngMomSpin _angmomspin
Definition: property.h:1657
std::string name() const override
Definition: property.h:1651
double evolve_angmom(_UNUSED Star *s)
Definition: property.cpp:1948
void init(const double &a) override
Definition: property.h:1655
AngMomSpin(bool reg=true)
Definition: property.h:1645
AngMomSpin * Instance() override
Definition: property.h:1659
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1980
Definition: binstar.h:26
Definition: property.h:1451
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1176
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:1179
void evolve_remnant(_UNUSED Star *s) override
Definition: property.cpp:1186
Bmag(bool reg=true)
Definition: property.h:1454
static Bmag _bmag
Definition: property.h:1461
Bmag * Instance() override
Definition: property.h:1465
static size_t ID
Definition: property.h:1460
std::string name() const override
Definition: property.h:1462
virtual std::string units()
Definition: property.h:1463
Convective envelope properties ****‍/.
Definition: property.h:1338
void set_refpointers(_UNUSED Star *s) override
Definition: property.cpp:188
Core radii Rhe, Rco.
Definition: property.h:1096
virtual double estimate_Rcore(double Mcore, double scale_factor)
Definition: property.h:1107
Definition: property.h:1260
Csup * Instance() override
Definition: property.h:1274
static size_t ID
Definition: property.h:1269
size_t TabID() const override
Definition: property.h:1272
std::string name() const override
Definition: property.h:1278
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1787
static Csup _csup
Definition: property.h:1270
Csup(bool reg=true)
Definition: property.h:1263
Definition: property.h:1413
void evolve_without_table(_UNUSED Star *s) override
Definition: property.cpp:1886
Depthconv * Instance() override
Definition: property.h:1428
static Depthconv _depthconv
Definition: property.h:1424
std::string name() const override
Definition: property.h:1432
Depthconv(bool reg=true)
Definition: property.h:1416
double estimate_Dconv(_UNUSED Star *s)
Definition: property.cpp:1893
static size_t ID
Definition: property.h:1423
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1875
size_t TabID() const override
Definition: property.h:1426
Definition: property.h:1688
void copy_V_from(_UNUSED Property *p) override
Definition: property.h:1694
Definition: property.h:1813
void synch() override
Definition: property.h:1827
void update_derived(Star *s) override
Definition: property.cpp:2732
virtual bool amiderived()
Definition: property.h:1824
void set_remnant(_UNUSED Star *s)
Definition: property.h:1834
void evolve_nakedco(_UNUSED Star *s)
Definition: property.h:1836
void copy_V_from(_UNUSED Property *p) override
Definition: property.h:1819
void evolve_remnant(_UNUSED Star *s)
Definition: property.h:1835
Binding energy of the envelope.
Definition: property.h:2232
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2551
Ebind * Instance() override
Definition: property.h:2243
void set_remnant(_UNUSED Star *s) override
Definition: property.h:2249
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:2250
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:2251
static Ebind _ebind
Definition: property.h:2236
Ebind(bool reg=true)
Definition: property.h:2238
std::string name() const override
Definition: property.h:2246
std::string units() override
Definition: property.h:2247
static size_t ID
Definition: property.h:2235
Definition: property.h:2336
Event(bool reg=true)
Definition: property.h:2341
std::string name() const override
Definition: property.h:2351
Event * Instance() override
Definition: property.h:2348
static size_t ID
Definition: property.h:2338
bool is_qhe_set
Definition: property.h:2355
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2691
static Event _event
Definition: property.h:2339
Definition: property.h:1234
std::string name() const override
Definition: property.h:1252
HEsup * Instance() override
Definition: property.h:1248
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1781
static size_t ID
Definition: property.h:1243
static HEsup _hesup
Definition: property.h:1244
HEsup(bool reg=true)
Definition: property.h:1237
size_t TabID() const override
Definition: property.h:1246
Definition: property.h:1208
std::string name() const override
Definition: property.h:1226
Hsup(bool reg=true)
Definition: property.h:1211
Hsup * Instance() override
Definition: property.h:1222
static Hsup _hsup
Definition: property.h:1218
size_t TabID() const override
Definition: property.h:1220
static size_t ID
Definition: property.h:1217
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1775
Inertia.
Definition: property.h:999
Inertia * Instance() override
Definition: property.h:1013
double get_0(_UNUSED const Star *s=NULL) override
Definition: property.h:1036
Inertia(bool reg=true)
Definition: property.h:1002
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:324
double estimate_Inertia_DeMink(_UNUSED Star *s)
Definition: property.cpp:434
double get_0_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:1034
void set_wM(Star *s) override
Definition: property.cpp:468
void evolve_remnant(_UNUSED Star *s) override
Definition: property.cpp:333
static Inertia _inertia
Definition: property.h:1009
void set_refpointers(_UNUSED Star *s) override
Definition: property.cpp:343
double estimate_logInertia(_UNUSED Star *s)
Definition: property.cpp:385
void correct_interpolation_errors_real(_UNUSED Star *s) override
Definition: property.cpp:369
double estimate_Inertia_Hurley(_UNUSED Star *s)
Definition: property.cpp:422
double estimate_Inertia_homogeneous_sphere(double Mass, double Outer_radius, double Inner_radius=0.)
Definition: property.cpp:389
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:294
double get(_UNUSED const Star *s=NULL) override
Definition: property.h:1035
double spin_core
Definition: property.h:1091
double get_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:1033
double estimate_Inertia_homogeneous_sphere_wcore(_UNUSED Star *s)
Definition: property.cpp:414
void check_and_set_rzams(_UNUSED Star *s)
void evolve_without_table(_UNUSED Star *s) override
Definition: property.cpp:378
size_t TabID() const override
Definition: property.h:1011
std::string name() const override
Definition: property.h:1031
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.cpp:338
double(Inertia::* inertia_func)(_UNUSED Star *s)
Definition: property.h:1090
double estimate_Inertia_homogeneous_sphere(_UNUSED Star *s)
static size_t ID
Definition: property.h:1008
Definition: property.h:2008
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:2028
virtual void restore() override
Definition: property.h:2032
virtual void synch() override
Definition: property.h:2033
double get_0_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:2041
void set_remnant(_UNUSED Star *s) override
Definition: property.h:2026
double get_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:2037
bool new_estimate_needed()
Definition: property.h:2053
void evolve_empty(_UNUSED Star *s) override
Definition: property.h:2024
unsigned int evolve_number
Definition: property.h:2074
void evolve(_UNUSED Star *s) override
Definition: property.h:2015
void set(const double &a) override
Definition: property.h:2058
void update_from_binary(_UNUSED Star *s, _UNUSED const double &DV, _UNUSED Binstar *b) override
Definition: property.h:2018
void set_empty(_UNUSED Star *s) override
Definition: property.h:2023
double get_0(_UNUSED const Star *s=NULL) override
Definition: property.h:2045
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:2027
void update_derived(_UNUSED Star *s) override
Definition: property.h:2030
std::string name() const override
Definition: property.h:2012
unsigned int last_evolve_number
Definition: property.h:2074
Definition: property.h:2078
double estimate_lambda_Claeys14(const Star *star, bool whole_cenv=false)
Definition: property.cpp:2216
std::string name() const override
Definition: property.h:2093
static Lambda _lambda
Definition: property.h:2083
std::string units() override
Definition: property.h:2094
std::unique_ptr< Lambda_Base > lambda_base_ptr
Definition: property.h:2208
double estimate_lambda(const Star *star)
Definition: property.cpp:2047
double estimate_lambda_Klencki21(const Star *star, bool interpolate=false)
Definition: property.cpp:2518
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2031
bool first_call
Definition: property.h:2207
void set_remnant(_UNUSED Star *s) override
Definition: property.h:2096
double Rzams_cached
Definition: property.h:2204
double Zmet_cachedR
Definition: property.h:2204
Lambda(bool reg=true)
Definition: property.h:2085
double Mzams_cachedR
Definition: property.h:2204
double get_M0_BSE(const Star *s)
Definition: property.cpp:2495
double estimate_lambda_Parsec(const Star *star)
Definition: property.cpp:2342
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:2097
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:2098
Lambda * Instance() override
Definition: property.h:2090
double estimate_lambda_Izzard04(const Star *star, bool whole_cenv=false)
Definition: property.cpp:2086
double estimate_lambda_BSE(const Star *star, bool whole_cenv=false, bool m0_as_hurley=false)
Definition: property.cpp:2346
static size_t ID
Definition: property.h:2082
double Zmet_cachedM
Definition: property.h:2203
double Mzams_cachedM
Definition: property.h:2203
double estimate_lambda_Nanjing(const Star *star, bool interpolate=false)
Definition: property.cpp:2536
double get_Rzams(const Star *s)
Definition: property.cpp:2507
double M0_cached
Definition: property.h:2203
Definition: property.h:382
void evolve(_UNUSED Star *s) override
Definition: property.h:405
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:746
std::string name() const override
Definition: property.h:402
void synch() override
Definition: property.h:398
static Localtime _localtime
To be added.
Definition: property.h:392
void special_evolve(_UNUSED Star *s) override
Definition: property.cpp:736
Localtime(bool reg=true)
Definition: property.h:385
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:409
Localtime * Instance() override
Definition: property.h:394
void set_remnant(_UNUSED Star *s) override
Definition: property.h:407
void init(const double &a) override
Definition: property.h:400
static size_t ID
Definition: property.h:391
Definition: property.h:921
static Luminosity _luminosity
Definition: property.h:931
Luminosity * Instance() override
Definition: property.h:940
Luminosity(bool reg=true)
Definition: property.h:924
static size_t ID
Definition: property.h:930
void evolve_remnant(_UNUSED Star *s) override
Definition: property.cpp:507
double get_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:944
double get(_UNUSED const Star *s=NULL) override
Definition: property.h:946
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:500
void set_wM(Star *s) override
Definition: property.cpp:512
std::string name() const override
Definition: property.h:935
double get_0_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:945
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:485
double get_0(_UNUSED const Star *s=NULL) override
Definition: property.h:947
size_t TabID() const override
Definition: property.h:933
Definition: property.h:845
void correct_interpolation_errors(_UNUSED Star *s) override
Definition: property.cpp:791
static MCO _massco
Definition: property.h:857
MCO(bool reg=true)
Definition: property.h:848
MCO * Instance() override
Definition: property.h:859
void evolve(_UNUSED Star *s)
Definition: property.cpp:783
size_t TabID() const override
Definition: property.h:854
void correct_interpolation_errors_real(_UNUSED Star *s) override
Definition: property.cpp:807
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:875
std::string name() const override
Definition: property.h:863
static size_t ID
Definition: property.h:856
Definition: property.h:815
static size_t ID
Definition: property.h:826
void correct_interpolation_errors_real(_UNUSED Star *s) override
Definition: property.cpp:920
static MHE _masshe
Definition: property.h:827
void correct_interpolation_errors(_UNUSED Star *s) override
Definition: property.cpp:908
MHE(bool reg=true)
Definition: property.h:818
void evolve(_UNUSED Star *s)
Definition: property.cpp:888
std::string name() const override
Definition: property.h:833
MHE * Instance() override
Definition: property.h:829
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:956
size_t TabID() const override
Definition: property.h:824
Definition: property.h:755
std::string units() override
Definition: property.h:757
void copy_V_from(Property *p) override
Definition: property.h:763
double get_Vlast(const Star *s) const override
Definition: property.cpp:766
Definition: property.h:776
static size_t ID
Definition: property.h:785
Mass(bool reg=true)
Definition: property.h:779
virtual void safety_check()
Definition: property.h:808
void update_from_binary(Star *s, const double &DV, _UNUSED Binstar *b) override
Definition: property.cpp:217
void set_remnant(Star *s) override
Definition: property.cpp:203
std::string name() const override
Definition: property.h:794
Mass * Instance() override
Definition: property.h:790
void correct_interpolation_errors_real(_UNUSED Star *s) override
Definition: property.cpp:274
static Mass _mass
Definition: property.h:786
void correct_interpolation_errors(_UNUSED Star *s) override
Definition: property.cpp:258
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:212
size_t TabID() const override
Definition: property.h:788
Definition: property.h:2417
void evolve(_UNUSED Star *s) override
Definition: property.h:2433
NSsalpha(bool reg=true)
Definition: property.h:2421
std::string name() const override
Definition: property.h:2430
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:2714
static NSsalpha _nssalpha
Definition: property.h:2420
std::string units() override
Definition: property.h:2431
double sinalpha
Definition: property.h:2440
double get(_UNUSED const Star *s=NULL) override
Definition: property.h:2436
NSsalpha * Instance() override
Definition: property.h:2426
static size_t ID
Definition: property.h:2419
Definition: property.h:589
void evolve(_UNUSED Star *s) override
Definition: property.h:611
NextOutput * Instance() override
Definition: property.h:602
void set_remnant(_UNUSED Star *s) override
Definition: property.h:614
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:616
std::string name() const override
Definition: property.h:606
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:617
static size_t ID
Definition: property.h:599
void special_evolve(Star *s) override
Definition: property.cpp:1242
static NextOutput _nextoutput
Definition: property.h:600
NextOutput(bool reg=true)
Definition: property.h:592
void init(const double &a)
Definition: property.h:608
void restore() override
Definition: property.h:619
Definition: property.h:1286
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1793
size_t TabID() const override
Definition: property.h:1298
Nsup(bool reg=true)
Definition: property.h:1289
static Nsup _nsup
Definition: property.h:1296
Nsup * Instance() override
Definition: property.h:1300
static size_t ID
Definition: property.h:1295
std::string name() const override
Definition: property.h:1304
Definition: property.h:1476
static size_t ID
Definition: property.h:1484
virtual std::string units()
Definition: property.h:1487
void evolve_remnant(_UNUSED Star *s) override
Definition: property.cpp:1199
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:1192
OmegaRem(bool reg=true)
Definition: property.h:1478
std::string name() const override
Definition: property.h:1486
void evolve(_UNUSED Star *s) override
Definition: property.h:1494
static OmegaRem _omegarem
Definition: property.h:1485
OmegaRem * Instance() override
Definition: property.h:1489
Definition: property.h:1897
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1991
std::string units() override
Definition: property.h:1908
OmegaSpin(bool reg=true)
Definition: property.h:1901
std::string name() const override
Definition: property.h:1907
OmegaSpin * Instance() override
Definition: property.h:1915
void init(const double &a) override
Definition: property.h:1911
static OmegaSpin _omegaspin
Definition: property.h:1913
static size_t ID
Definition: property.h:1912
void changed_track(Star *s, _UNUSED Star *s_jtrack) override
Definition: property.h:1920
Definition: property.h:959
void set_refpointers(_UNUSED Star *s) override
Definition: property.cpp:134
bool amiderived() override
Definition: property.h:975
virtual void evolve_without_table(_UNUSED Star *s)
Definition: property.h:990
void evolve(Star *s) override
Definition: property.h:965
virtual void synch() override
Definition: property.h:980
void synch_v_value_without_table()
Definition: property.h:992
void update_derived(Star *s) override
Definition: property.cpp:151
Definition: property.h:1312
Osup * Instance() override
Definition: property.h:1326
Osup(bool reg=true)
Definition: property.h:1315
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1799
std::string name() const override
Definition: property.h:1330
size_t TabID() const override
Definition: property.h:1324
static size_t ID
Definition: property.h:1321
static Osup _osup
Definition: property.h:1322
BSE Type.
Definition: property.h:2263
std::string name() const override
Definition: property.h:2277
std::string units() override
Definition: property.h:2278
PhaseBSE * Instance() override
Definition: property.h:2274
static PhaseBSE _phasebse
Definition: property.h:2267
PhaseBSE(bool reg=true)
Definition: property.h:2269
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2569
static size_t ID
Definition: property.h:2266
Definition: property.h:881
void special_evolve(_UNUSED Star *s) override
Definition: property.cpp:659
void synch() override
Definition: property.h:900
static size_t ID
Definition: property.h:890
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:913
void set_empty(_UNUSED Star *s) override
Definition: property.h:902
Phase(bool reg=true)
Definition: property.h:884
void evolve_empty(_UNUSED Star *s) override
Definition: property.h:905
void set_wM(Star *s) override
Definition: property.cpp:709
size_t TabID() const override
Definition: property.h:893
void set_remnant(_UNUSED Star *s) override
Definition: property.h:901
void evolve(_UNUSED Star *s) override
Definition: property.h:912
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:705
std::string name() const override
Definition: property.h:899
Phase * Instance() override
Definition: property.h:895
static Phase _phase
Definition: property.h:891
Definition: property.h:2448
std::string units() override
Definition: property.h:2463
void set_remnant(_UNUSED Star *s) override
Definition: property.h:2465
static size_t ID
Definition: property.h:2451
Plife * Instance() override
Definition: property.h:2458
std::string name() const override
Definition: property.h:2462
Plife(bool reg=true)
Definition: property.h:2453
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2724
static Plife _plife
Definition: property.h:2452
Definition: property.h:112
virtual void special_evolve(_UNUSED Star *s)
Definition: property.h:199
virtual std::string name() const
Definition: property.h:131
double V0
Definition: property.h:330
virtual void evolve_empty(_UNUSED Star *s)
Definition: property.h:158
virtual double get_Vlast(_UNUSED const Star *s) const
Definition: property.h:303
virtual void evolve(_UNUSED Star *s)
Definition: property.h:180
double wZ[2]
Definition: property.h:334
virtual void update_derived(_UNUSED Star *s)
Definition: property.h:239
virtual bool are_table_loaded() const
Definition: property.h:315
virtual void correct_interpolation_errors_real(_UNUSED Star *s)
Definition: property.h:258
static size_t _size
Definition: property.h:327
virtual void resynch(_UNUSED Star *s)
Definition: property.h:145
vector< double > VBIN
Definition: property.h:331
double V
Definition: property.h:330
double get_0_fk_raw(_UNUSED const Star *s=NULL) const
Definition: property.h:293
double wM[4]
Definition: property.h:334
virtual void restore()
Definition: property.h:260
virtual void evolve_nakedco(_UNUSED Star *s)
Definition: property.h:177
double Dvalue
Definition: property.h:329
virtual size_t TabID()
Definition: property.h:197
void set_fk(const double &a)
Definition: property.h:337
virtual Property * Instance()=0
virtual void set(const double &a)
Definition: property.h:339
virtual void evolve_remnant(_UNUSED Star *s)
Definition: property.h:176
double get_0_raw(_UNUSED const Star *s=NULL) const
Definition: property.h:295
void Register(Property *_p, size_t *id, const std::string &_name)
Definition: property.h:348
std::map< std::string, size_t > _PrintMap
Definition: property.h:116
SevnLogging svlog
Definition: property.h:354
double interpolating_values[4]
Definition: property.h:333
double value0
Definition: property.h:329
virtual void resynch(_UNUSED const double &dt, _UNUSED bool set0=true)
Definition: property.h:143
static size_t size()
Definition: property.h:312
double get_raw(_UNUSED const Star *s=NULL) const
Definition: property.h:294
virtual double get_fk(_UNUSED const Star *s=nullptr)
Definition: property.h:285
virtual void set_empty_in_bse(_UNUSED Star *s, _UNUSED Binstar *b)
Definition: property.h:157
virtual void evolve_fake(Star *s)
Definition: property.cpp:16
virtual bool amiderived()
Definition: property.h:141
virtual ~Property()
Definition: property.h:125
virtual void set_refpointers(_UNUSED Star *s)
Definition: property.h:319
double * get_wm()
Definition: property.h:306
double value
Definition: property.h:329
virtual void set_empty(_UNUSED Star *s)
Definition: property.h:147
virtual void update_from_binary(_UNUSED Star *s, const double &DV, _UNUSED Binstar *b=nullptr)
Definition: property.h:225
Property()
Definition: property.h:119
virtual void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack)
Definition: property.h:280
static vector< Property * > all
Definition: property.h:313
virtual void set_remnant(_UNUSED Star *s)
Definition: property.h:162
static _PrintMap PrintMap
Definition: property.h:117
virtual std::string units()
Definition: property.h:133
double * val_ref[4]
Definition: property.h:322
virtual void set_0(const double &a)
Definition: property.h:340
virtual void reset()
Definition: property.h:272
double get_fk_raw(_UNUSED const Star *s=NULL) const
Definition: property.h:292
virtual void evolve_real()
Definition: property.h:209
virtual void set_w(_UNUSED Star *s)
Definition: property.h:309
virtual void init(_UNUSED const double &a)
Definition: property.h:207
virtual void update_variation()
Definition: property.h:249
virtual double get_0(_UNUSED const Star *s=nullptr)
Definition: property.h:288
virtual double get(_UNUSED const Star *s=nullptr)
Definition: property.h:287
void set_0_fk(const double &a)
Definition: property.h:338
double * get_wz()
Definition: property.h:307
virtual void safety_check()
Definition: property.h:343
virtual void set_remnant_in_bse(_UNUSED Star *s, _UNUSED Binstar *b)
Definition: property.h:175
virtual void copy_V_from(Property *p)
Definition: property.h:241
void set_VBIN(const size_t &id, const double &a)
Definition: property.h:341
virtual void synch()
Definition: property.h:265
double * val_in[4]
Definition: property.h:323
virtual double get_0_fk(_UNUSED const Star *s=nullptr)
Definition: property.h:286
virtual void correct_interpolation_errors(_UNUSED Star *s)
Definition: property.h:257
Definition: property.h:1348
std::string name() const override
Definition: property.h:1366
Qconv * Instance() override
Definition: property.h:1362
static Qconv _qconv
Definition: property.h:1358
static size_t ID
Definition: property.h:1357
double estimate_Qconv(_UNUSED Star *s)
Definition: property.cpp:1826
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1807
void evolve_without_table(_UNUSED Star *s) override
Definition: property.cpp:1817
size_t TabID() const override
Definition: property.h:1360
Qconv(bool reg=true)
Definition: property.h:1351
Definition: property.h:675
std::string units() override
Definition: property.h:678
void copy_V_from(Property *p) override
Definition: property.h:685
Definition: property.h:1158
size_t TabID() const override
Definition: property.h:1170
static RCO _rco
Definition: property.h:1168
double estimate_Rcore(_UNUSED Star *s)
Definition: property.cpp:1164
void correct_interpolation_errors(_UNUSED Star *s) override
Definition: property.cpp:1089
RCO * Instance() override
Definition: property.h:1172
static size_t ID
Definition: property.h:1167
void evolve(_UNUSED Star *s)
Definition: property.cpp:1078
std::string name() const override
Definition: property.h:1180
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1133
void correct_interpolation_errors_real(_UNUSED Star *s) override
Definition: property.cpp:1109
RCO(bool reg=true)
Definition: property.h:1161
void evolve_without_table(_UNUSED Star *s) override
Definition: property.cpp:1154
void set_refpointers(_UNUSED Star *s) override
Definition: property.cpp:1143
Definition: property.h:1118
static size_t ID
Definition: property.h:1127
static RHE _rhe
Definition: property.h:1128
void correct_interpolation_errors(_UNUSED Star *s) override
Definition: property.cpp:1000
double estimate_Rcore(_UNUSED Star *s)
Definition: property.cpp:1068
RHE * Instance() override
Definition: property.h:1132
size_t TabID() const override
Definition: property.h:1130
void set_refpointers(_UNUSED Star *s) override
Definition: property.cpp:1057
RHE(bool reg=true)
Definition: property.h:1121
void correct_interpolation_errors_real(_UNUSED Star *s) override
Definition: property.cpp:1021
void evolve_without_table(_UNUSED Star *s) override
Definition: property.cpp:1047
std::string name() const override
Definition: property.h:1138
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1033
void evolve(_UNUSED Star *s)
Definition: property.cpp:975
Definition: property.h:697
static size_t ID
Definition: property.h:713
void set_wM(_UNUSED Star *s) override
Definition: property.cpp:618
double get_0(_UNUSED const Star *s=NULL) override
Definition: property.h:729
Radius(bool reg=true)
Definition: property.h:700
double get_0_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:727
void set(const double &a) override
Definition: property.h:735
std::string name() const override
Definition: property.h:708
void evolve_fake_linear(Star *s)
double get_fk(_UNUSED const Star *s=NULL) override
Definition: property.h:726
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:586
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:604
void evolve_remnant(_UNUSED Star *s) override
Definition: property.cpp:613
void evolve_fake(Star *s) override
Definition: property.cpp:541
double get(_UNUSED const Star *s=NULL) override
Definition: property.h:728
void evolve(_UNUSED Star *s) override
Definition: property.cpp:528
void set_0(const double &a) override
Definition: property.h:736
size_t TabID() const override
Definition: property.h:706
void update_from_binary(_UNUSED Star *s, const double &DV, _UNUSED Binstar *b=nullptr) override
Definition: property.cpp:646
static Radius _radius
Definition: property.h:714
Radius * Instance() override
Definition: property.h:716
virtual void safety_check()
Definition: property.h:742
Definition: property.h:1502
void evolve_empty(_UNUSED Star *s) override
Definition: property.h:1527
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:2014
RemnantType(bool reg=true)
Definition: property.h:1505
static size_t ID
Definition: property.h:1512
void evolve(_UNUSED Star *s) override
Definition: property.cpp:2024
void synch() override
Definition: property.h:1521
void set_empty(_UNUSED Star *s) override
Definition: property.cpp:2019
static RemnantType _remnanttype
Definition: property.h:1513
std::string name() const override
Definition: property.h:1520
RemnantType * Instance() override
Definition: property.h:1516
Definition: property.h:1870
Rs(bool reg=true)
Definition: property.h:1877
std::string name() const override
Definition: property.h:1885
std::string units() override
Definition: property.h:1886
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1208
static size_t ID
Definition: property.h:1874
static Rs _rs
Definition: property.h:1875
Rs * Instance() override
Definition: property.h:1882
Definition: property.h:1927
std::string name() const override
Definition: property.h:1942
Spin * Instance() override
Definition: property.h:1939
std::string units() override
Definition: property.h:1943
static Spin _spin
Definition: property.h:1931
Spin(bool reg=true)
Definition: property.h:1933
void changed_track(Star *s, _UNUSED Star *s_jtrack) override
Definition: property.h:1954
void init(const double &a) override
Definition: property.h:1951
void synch() override
Definition: property.h:1946
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1216
static size_t ID
Definition: property.h:1930
static double Spin_from_OmegaSpin(double OmegaSpin, double Mass, double Radius)
Definition: property.cpp:1222
Definition: star.h:39
Definition: remnant.h:23
Chemical Surface composition.
Definition: property.h:1199
void set_refpointers(_UNUSED Star *s) override
Definition: property.cpp:175
Definition: property.h:631
void set_wM_log(_UNUSED Star *s)
Definition: property.cpp:119
void set_w(_UNUSED Star *s) override
Definition: property.cpp:66
void set_wM_rational(_UNUSED Star *s)
Definition: property.cpp:108
void set_wM_linear(_UNUSED Star *s)
Definition: property.cpp:97
virtual void set_wZ(_UNUSED Star *s)
Definition: property.cpp:87
void set_refpointers(_UNUSED Star *s) override
Definition: property.cpp:53
virtual void set_wM(_UNUSED Star *s)
Definition: property.cpp:71
virtual size_t TabID() const =0
bool are_table_loaded() const override
Definition: property.h:638
bool table_loaded
Definition: property.h:666
Definition: property.h:1385
static size_t ID
Definition: property.h:1394
Tconv * Instance() override
Definition: property.h:1399
size_t TabID() const override
Definition: property.h:1397
std::string name() const override
Definition: property.h:1403
static Tconv _tconv
Definition: property.h:1395
Tconv(bool reg=true)
Definition: property.h:1388
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1868
Definition: property.h:1843
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:757
Temperature * Instance() override
Definition: property.h:1853
Temperature(bool reg=true)
Definition: property.h:1847
std::string units() override
Definition: property.h:1858
static size_t ID
Definition: property.h:1860
std::string name() const override
Definition: property.h:1857
void evolve(_UNUSED Star *s) override
Definition: property.cpp:751
static Temperature _temperature
Definition: property.h:1861
Definition: property.h:361
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:375
void copy_V_from(_UNUSED Property *p) override
Definition: property.h:369
virtual void set_empty(_UNUSED Star *s) override
Definition: property.h:376
std::string units() override
Definition: property.h:363
virtual void evolve_empty(_UNUSED Star *s) override
Definition: property.h:377
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:374
Definition: property.h:451
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:1698
std::string name() const override
Definition: property.h:464
void synch() override
Definition: property.h:558
Timestep * Instance() override
Definition: property.h:460
Timestep(bool reg=true)
Definition: property.h:453
static size_t ID
Definition: property.h:488
bool check_repeat_almost_naked(_UNUSED Star *s)
Definition: property.cpp:1583
static Timestep _timestep
Definition: property.h:489
void resynch(const double &dt, bool set0) override
Definition: property.h:560
void set_empty_in_bse(_UNUSED Star *s, _UNUSED Binstar *b) override
Definition: property.cpp:1723
void check_dt_limits(double &dt, Star *s)
Definition: property.cpp:1727
double timestep_remnant(Star *s)
Definition: property.cpp:1658
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:476
void evolve_empty(_UNUSED Star *s) override
Definition: property.h:484
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:475
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1250
bool checked_almost_naked
Definition: property.h:586
void set_empty(_UNUSED Star *s) override
Definition: property.h:477
void handle_star_check_repeat(Star *s)
Definition: property.cpp:1647
void set_remnant_in_bse(_UNUSED Star *s, _UNUSED Binstar *b) override
Definition: property.cpp:1718
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.cpp:1735
bool check_repeat(_UNUSED Star *s, const double &m0, const double &m, const double &derivative, const double tstart)
Definition: property.cpp:1516
Definition: property.h:419
Worldtime(bool reg=true)
Definition: property.h:422
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:445
void synch() override
Definition: property.h:437
std::string name() const override
Definition: property.h:436
void special_evolve(_UNUSED Star *s) override
Definition: property.cpp:1228
static Worldtime _worldtime
Definition: property.h:430
static size_t ID
Definition: property.h:429
Worldtime * Instance() override
Definition: property.h:432
void evolve(_UNUSED Star *s) override
Definition: property.h:443
void set_remnant(_UNUSED Star *s) override
Definition: property.h:439
Definition: property.h:1973
Xspin(bool reg=true)
Definition: property.h:1977
void set_remnant(_UNUSED Star *s) override
Definition: property.cpp:1999
std::string name() const override
Definition: property.h:1991
void evolve_remnant(_UNUSED Star *s) override
Definition: property.cpp:2006
Xspin * Instance() override
Definition: property.h:1987
static size_t ID
Definition: property.h:1984
void evolve(_UNUSED Star *s) override
Definition: property.h:1992
static Xspin _xspin
Definition: property.h:1985
Definition: property.h:2284
static Zams _zams
Definition: property.h:2288
std::string name() const override
Definition: property.h:2298
void set_remnant(_UNUSED Star *s) override
Definition: property.h:2301
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2579
Zams * Instance() override
Definition: property.h:2295
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:2302
static size_t ID
Definition: property.h:2287
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:2303
std::string units() override
Definition: property.h:2299
Zams(bool reg=true)
Definition: property.h:2290
Definition: property.h:2309
Zmet(bool reg=true)
Definition: property.h:2315
Zmet * Instance() override
Definition: property.h:2320
void set_remnant(_UNUSED Star *s) override
Definition: property.h:2326
static Zmet _zmet
Definition: property.h:2313
static size_t ID
Definition: property.h:2312
void evolve_nakedco(_UNUSED Star *s) override
Definition: property.h:2328
void evolve_remnant(_UNUSED Star *s) override
Definition: property.h:2327
std::string units() override
Definition: property.h:2324
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2588
std::string name() const override
Definition: property.h:2323
Definition: property.h:1754
std::string name() const override
Definition: property.h:1767
static size_t ID
Definition: property.h:1764
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1753
static dMCOdt _dmcodt
Definition: property.h:1765
dMCOdt * Instance() override
Definition: property.h:1771
std::string units() override
Definition: property.h:1768
dMCOdt(bool reg=true)
Definition: property.h:1758
Definition: property.h:1727
std::string name() const override
Definition: property.h:1740
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1759
dMHEdt * Instance() override
Definition: property.h:1744
static dMHEdt _dmhedt
Definition: property.h:1738
static size_t ID
Definition: property.h:1737
std::string units() override
Definition: property.h:1741
dMHEdt(bool reg=true)
Definition: property.h:1731
Definition: property.h:2363
static dMRLOdt _dmorlodt
Definition: property.h:2367
static size_t ID
Definition: property.h:2366
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2643
std::string units() override
Definition: property.h:2378
std::string name() const override
Definition: property.h:2377
dMRLOdt * Instance() override
Definition: property.h:2373
dMRLOdt(bool reg=true)
Definition: property.h:2368
Definition: property.h:2387
static size_t ID
Definition: property.h:2390
std::string units() override
Definition: property.h:2402
static dMaccwinddt _dmaccwinddt
Definition: property.h:2391
double get(_UNUSED const Star *s=NULL) override
Definition: property.cpp:2674
dMaccwinddt(bool reg=true)
Definition: property.h:2392
dMaccwinddt * Instance() override
Definition: property.h:2397
std::string name() const override
Definition: property.h:2401
Definition: property.h:1575
static size_t ID
Definition: property.h:1595
std::string name() const override
Definition: property.h:1590
void evolve(_UNUSED Star *s) override
Definition: property.h:1598
dMcumul_RLO(bool reg=true)
Definition: property.h:1578
void update_from_binary(_UNUSED Star *s, const double &DV, _UNUSED Binstar *b) override
Definition: property.cpp:2597
dMcumul_RLO * Instance() override
Definition: property.h:1586
static dMcumul_RLO _dMcumul_RLO
Definition: property.h:1596
Definition: property.h:1539
dMcumul_binary * Instance() override
Definition: property.h:1552
void evolve(_UNUSED Star *s) override
Definition: property.h:1564
static dMcumul_binary _dMcumul_binary
Definition: property.h:1561
static size_t ID
Definition: property.h:1560
std::string name() const override
Definition: property.h:1556
void changed_track(_UNUSED Star *s, _UNUSED Star *s_jtrack) override
Definition: property.h:1565
dMcumul_binary(bool reg=true)
Definition: property.h:1544
Definition: property.h:1610
dMcumulacc_wind * Instance() override
Definition: property.h:1621
void evolve(_UNUSED Star *s) override
Definition: property.h:1633
static dMcumulacc_wind _dMcumulacc_wind
Definition: property.h:1631
static size_t ID
Definition: property.h:1630
std::string name() const override
Definition: property.h:1625
dMcumulacc_wind(bool reg=true)
Definition: property.h:1613
Definition: property.h:1700
std::string units() override
Definition: property.h:1711
std::string name() const override
Definition: property.h:1710
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1765
static size_t ID
Definition: property.h:1714
dMdt(bool reg=true)
Definition: property.h:1704
dMdt * Instance() override
Definition: property.h:1717
static dMdt _dmdt
Definition: property.h:1715
Definition: property.h:1781
dRdt(bool reg=true)
Definition: property.h:1785
static size_t ID
Definition: property.h:1799
dRdt * Instance() override
Definition: property.h:1791
static dRdt _drdt
Definition: property.h:1800
std::string units() override
Definition: property.h:1796
void evolve(_UNUSED Star *s) override
Definition: property.cpp:1747
std::string name() const override
Definition: property.h:1795
Definition: sevnlog.h:43
void error(std::string errstate, const char *file_input=nullptr, int line_input=-1, bool stop=true) const
Definition: sevnlog.cpp:105
void debug(std::string errstate, const char *file_input=nullptr, int line_input=-1) const
Definition: sevnlog.cpp:194
void critical(std::string errstate, const char *file_input=nullptr, int line_input=-1) const
Definition: sevnlog.cpp:85
Definition: errhand.h:156
Definition: errhand.h:24
Definition: lookup_and_phases.h:17
@ NotARemnant
Definition: lookup_and_phases.h:81
@ Remnant
Definition: lookup_and_phases.h:50
@ _Nsup
Definition: lookup_and_phases.h:33
@ _Phase
Definition: lookup_and_phases.h:28
@ _HEsup
Definition: lookup_and_phases.h:31
@ _Osup
Definition: lookup_and_phases.h:34
@ _Hsup
Definition: lookup_and_phases.h:30
@ _Qconv
Definition: lookup_and_phases.h:35
@ _Tconv
Definition: lookup_and_phases.h:37
@ _MHE
Definition: lookup_and_phases.h:23
@ _MCO
Definition: lookup_and_phases.h:24
@ _Inertia
Definition: lookup_and_phases.h:29
@ _Depthconv
Definition: lookup_and_phases.h:36
@ _Radius
Definition: lookup_and_phases.h:22
@ _Mass
Definition: lookup_and_phases.h:21
@ _RHE
Definition: lookup_and_phases.h:25
@ _RCO
Definition: lookup_and_phases.h:26
@ _Lumi
Definition: lookup_and_phases.h:27
@ _Csup
Definition: lookup_and_phases.h:32
@ NoEvent
Definition: lookup_and_phases.h:158
const std::string n2s(T val, const char *file_input, const int line_input, const unsigned int precision=6)
Definition: utilities.h:144
constexpr double TINY
Definition: utilities.h:98
#define _UNUSED
Definition: property.h:105