Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2be856a
Add a basic .gitignore file
LourensVeen Jul 8, 2025
ac3e129
Use valid signature for main()
LourensVeen Jul 8, 2025
9e15c02
Fix multiple declaration of pi
LourensVeen Jul 8, 2025
558e916
Remove hop.C, it doesn't compile without hop.h
LourensVeen Jul 8, 2025
0851f70
Use 1 Z_sol for the random binaries
LourensVeen Jul 8, 2025
3bd23c4
Remove unused file with unresolved symbols
LourensVeen Jul 8, 2025
d45403e
Fix toolbox build missing symbol
LourensVeen Jul 8, 2025
2fe0e11
Fix various type conversion warnings
LourensVeen Jul 8, 2025
3fe4192
Fix missing return warning
LourensVeen Jul 8, 2025
17dd841
Fix register storage class warning/error
LourensVeen Jul 8, 2025
6f6749c
Check scanf return code to avoid warning
LourensVeen Jul 8, 2025
92d991a
Keep control from reaching end of non-void function
LourensVeen Jul 8, 2025
e7ed870
Fix string constant constness warnings
LourensVeen Jul 22, 2025
1fe6e82
Fix a bunch more type conversion warnings
LourensVeen Jul 22, 2025
459a50c
Fix ignored return value warning
LourensVeen Jul 22, 2025
e65ea1b
Fix control reaching end of non-void function
LourensVeen Jul 22, 2025
a645df1
Add sstar/starclass objects to library only once
LourensVeen Jul 22, 2025
d212ebb
Build libs without and executables with -DTOOLBOX, as seemingly intended
LourensVeen Jul 22, 2025
17879a0
Fix more conversion warnings from clang
LourensVeen Jul 22, 2025
9e0238f
Fix a few more compiler warnings
LourensVeen Jul 22, 2025
098861c
Add binaries and data to gitignore
LourensVeen Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Makefile.inc
dstar/Makefile.inc
**/*.o
**/*.a
starev
dstar/Normalisation
dstar/SeBa
**/*.data

8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CXXFLAGS += -I./include -I./include/star -DHAVE_CONFIG_H -DTOOLBOX -Wconversion
CXXFLAGS += -I./include -I./include/star -DHAVE_CONFIG_H -Wconversion
LDLIBS += -Lsstar -lsstar -Lnode -lnode -Lstd -lstd -lm
CFLAGS += -O
CXXFLAGS += -O
Expand All @@ -16,6 +16,12 @@ test:
Makefile.inc: Makefile.inc.conf
@sed s#__BASE__#$(PWD)#g Makefile.inc.conf >Makefile.inc

starev.o: starev.C
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DTOOLBOX -c -o $@ $^

starev: starev.o
$(CXX) -o $@ $(LDFLAGS) $< $(LDLIBS)

lib: Makefile.inc
@for d in $(DIRS) ; do echo '\nmake' $@ in $$d; make -C $$d $@ ; done

Expand Down
11 changes: 10 additions & 1 deletion dstar/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CXXFLAGS += -I../include -I../include/star \
-D_SRC_='"no_source_available"' \
-DHAVE_CONFIG_H -DTOOLBOX
-DHAVE_CONFIG_H
LDLIBS += \
-L. -ldstar \
-L../sstar -lsstar \
Expand All @@ -17,6 +17,15 @@ DIRS = init io starclass stardyn util

all: lib $(EXE)

%.o: %.C
$(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) -DTOOLBOX -c $<

SeBa: SeBa.o
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)

Normalisation: Normalisation.o
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)

Makefile.inc: Makefile.inc.conf
@sed s#__BASE__#$(PWD)#g Makefile.inc.conf >Makefile.inc

Expand Down
7 changes: 3 additions & 4 deletions dstar/SeBa.C
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ local bool evolve_binary(dyn * bi,
real start_time, real end_time,
bool stop_at_merger_or_disruption,
bool stop_at_remnant_formation,
char* SeBa_outfile) {
const char* SeBa_outfile) {


double_star* ds = dynamic_cast(double_star*,
Expand Down Expand Up @@ -251,10 +251,9 @@ int main(int argc, char ** argv) {
real start_time = 0;
real end_time = 13500;//35;

char* input_filename;
char* output_filename;
const char* input_filename;
const char* output_filename;
output_filename = "SeBa.data";
//char output_filename = new char "SeBa.data";

int input_seed=0;
char seedlog[64];
Expand Down
6 changes: 3 additions & 3 deletions dstar/init/initdouble.C
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ void adddouble(node * b, real dyn_time,
real e_min, real e_max)
{
if (REPORT_ADD_DOUBLE) {
int p = cerr.precision(HIGH_PRECISION);
std::streamsize p = cerr.precision(HIGH_PRECISION);
cerr<<"adddouble: "<<b<<" "<<dyn_time;
cerr.precision(p);
cerr <<" "<<a_min<<" "<<a_max<<" "<<e_min<<" "<<e_max << endl;
Expand Down Expand Up @@ -701,7 +701,7 @@ cerr << "addstar(node... called from adddouble(node ..." << endl;
}
#else

void main(int argc, char ** argv) {
int main(int argc, char ** argv) {

bool F_flag = false;
bool P_flag = false;
Expand Down Expand Up @@ -820,7 +820,7 @@ void main(int argc, char ** argv) {
q_min, q_max, qf, q_exp,
a_min, a_max, af, a_exp,
e_min, e_max, ef, e_exp,
m_prim, m_sec, sma, ecc);
m_prim, m_sec, sma, ecc, 1.0);
cerr << "\t" << m_prim
<< "\t" << m_sec
<< "\t" << sma
Expand Down
5 changes: 4 additions & 1 deletion dstar/starclass/cluster_support.C
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* make_profile -- make profile for whole n-binary cluster
*-----------------------------------------------------------------------------
*/
/* Disabled because make_profile in double_support.C is broken
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be fixed? or can we leave it out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it requires something that's broken/disabled, so if it were used then we would have noticed that already, hopefully. SeBa simulates single stars right? So then a function for making a cluster is probably not needed.


void make_profile(initial_cluster& c_init,
cluster_profile& c_prof, profile prof,
star_type_spec s_prof = Emission) {
Expand All @@ -28,7 +30,8 @@ void make_profile(initial_cluster& c_init,
c_prof.enhance_cluster_profile(binary, prof, s_prof);
}

}
}
*/

/*-----------------------------------------------------------------------------
* cluster_profile -- Support routines for cluster simulation.
Expand Down
2 changes: 1 addition & 1 deletion dstar/starclass/double_star.C
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ void double_star::dump(ostream & s, bool brief) {
}
}

void double_star::dump(char * filename, bool brief) {
void double_star::dump(const char * filename, bool brief) {


ofstream s(filename, ios::app|ios::out);
Expand Down
3 changes: 3 additions & 0 deletions dstar/starclass/double_support.C
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ void put_state(double_state d,
* make_profile --
*-----------------------------------------------------------------------------
*/
/* Disabled because get_new_binary returns NULL, so this is broken
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need/warrant a fix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If neither of us know, is there anyone else who can answer that?

void make_profile(int id, real start_time,
double_profile& binary, double_init& init) {


cerr<<"double_support make_profile"<<endl;
real dt = (init.end_time - start_time)/init.n_steps;

Expand Down Expand Up @@ -233,6 +235,7 @@ void make_profile(int id, real start_time,
}

}
*/

void double_profile::init_double_profile(double_star* b,
star_state& p, star_state& s) {
Expand Down
4 changes: 2 additions & 2 deletions dstar/starclass/triple_star.C
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ cerr<<"real double_star::add_mass_to_accretor(mdot="<<mdot
real mdot_p = mdot*mtt_b/mtt_p;
real mdot_s = mdot*mtt_b/mtt_s;

mdot_p = get_primary()->add_mass_to_accretor(mdot_p, dt, hydrogen);
mdot_s = get_secondary()->add_mass_to_accretor(mdot_s, dt, hydrogen);
mdot_p = get_primary()->add_mass_to_accretor(mdot_p, dt != 0.0, hydrogen);
mdot_s = get_secondary()->add_mass_to_accretor(mdot_s, dt != 0.0, hydrogen);

real mdot_left = mdot - (mdot_p + mdot_s);

Expand Down
8 changes: 4 additions & 4 deletions dstar/stardyn/adddouble.C
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ local void do_the_adding(hdyn *bi, real stellar_time, // bi is binary CM
}

if (REPORT_ADD_DOUBLE) {
int p = cerr.precision(HIGH_PRECISION);
std::streamsize p = cerr.precision(HIGH_PRECISION);
cerr << "Before adddouble: at " << stellar_time << " to: ";
bi->pretty_print_tree(cerr);
cerr << " a=" << sma << " e=" << ecc << endl;
Expand Down Expand Up @@ -204,7 +204,7 @@ local void do_the_adding(hdyn *bi, real stellar_time, // bi is binary CM
new_double->set_star_story(old_story);

if (REPORT_ADD_DOUBLE) {
int p = cerr.precision(HIGH_PRECISION);
std::streamsize p = cerr.precision(HIGH_PRECISION);
cerr<<"After adddouble: at "<<stellar_time<< " to: ";
new_double->dump(cerr);
od->get_kepler()->print_all(cerr);
Expand All @@ -231,7 +231,7 @@ void adddouble(hdyn *b, // b is binary CM
real e_min, real e_max)
{
if (REPORT_ADD_DOUBLE) {
int p = cerr.precision(HIGH_PRECISION);
std::streamsize p = cerr.precision(HIGH_PRECISION);
cerr<<"adddouble: "<<b<<" at T="<<dyn_time<<endl;
cerr.precision(p);
}
Expand Down Expand Up @@ -315,7 +315,7 @@ void adddouble(hdyn *b, // b is binary CM
* main --
*-----------------------------------------------------------------------------
*/
main(int argc, char ** argv)
int main(int argc, char ** argv)
{
int c;
bool A_flag = FALSE;
Expand Down
2 changes: 1 addition & 1 deletion dstar/stardyn/dstar_state.C
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ double_state make_state(dyn* b) {
#else


main() {
int main() {
cerr <<"Hello"<<endl;
}

Expand Down
185 changes: 0 additions & 185 deletions dstar/stardyn/dstar_stats.C
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this a duplicate with a wrong name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think that the embedded starlab is only a partial copy, some (presumably unused) parts of it seem to have been removed, or were never copied in. It seems like the build system clean-up causes it to now try to build some things that weren't built before, and with parts of starlab missing, they're erroring out. Since SeBa doesn't use this anyway, I thought the easiest solution was just to remove it.

This file was deleted.

Loading