Skip to content

Commit 3892e49

Browse files
authored
Merge branch 'main' into cleanup/ic_molecular_cloud
2 parents 6617f6f + aea5b55 commit 3892e49

5 files changed

Lines changed: 212 additions & 149 deletions

File tree

.zenodo.json

Lines changed: 128 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,130 @@
11
{
2-
"creators": [
3-
{
4-
"affiliation": "Leiden University",
5-
"name": "Portegies Zwart, Simon",
6-
"orcid": "0000-0001-5839-0302"
7-
},
8-
{
9-
"affiliation": "Leiden University",
10-
"name": "van Elteren, Arjen"
11-
},
12-
{
13-
"affiliation": "Netherlands eScience Center",
14-
"name": "Pelupessy, Inti"
15-
},
16-
{
17-
"affiliation": "Drexel University",
18-
"name": "McMillan, Steve"
19-
},
20-
{
21-
"affiliation": "Université de Genève",
22-
"name": "Rieder, Steven",
23-
"orcid": "0000-0003-3688-5798"
24-
},
25-
{
26-
"affiliation": "Leiden University",
27-
"name": "de Vries, Nathan"
28-
},
29-
{
30-
"affiliation": "Leiden University",
31-
"name": "Marosvolgyi, Marcell"
32-
},
33-
{
34-
"affiliation": "Drexel University",
35-
"name": "Whitehead, Alfred"
36-
},
37-
{
38-
"affiliation": "Drexel University",
39-
"name": "Wall, Joshua"
40-
},
41-
{
42-
"affiliation": "Netherlands eScience Center",
43-
"name": "Drost, Niels",
44-
"orcid": "0000-0001-9795-7981"
45-
},
46-
{
47-
"affiliation": "Leiden University",
48-
"name": "Jilkova, Lucie"
49-
},
50-
{
51-
"affiliation": "Leiden University",
52-
"name": "Martinez Barbosa, Carmen"
53-
},
54-
{
55-
"affiliation": "Leiden University",
56-
"name": "van der Helm, Edwin"
57-
},
58-
{
59-
"affiliation": "Leiden University",
60-
"name": "Beedorf, Jeroen"
61-
},
62-
{
63-
"affiliation": "Netherlands eScience Center",
64-
"name": "Bos, Patrick"
65-
},
66-
{
67-
"affiliation": "Leiden University",
68-
"name": "Boekholt, Tjarda"
69-
},
70-
{
71-
"affiliation": "Netherlands eScience Center",
72-
"name": "van Werkhoven, Ben"
73-
},
74-
{
75-
"affiliation": "Leiden University",
76-
"name": "Wijnen, Thomas"
77-
},
78-
{
79-
"affiliation": "Institute for Advanced Study",
80-
"name": "Hamers, Adrian"
81-
},
82-
{
83-
"affiliation": "Booking.com",
84-
"name": "Caputo, Daniel"
85-
},
86-
{
87-
"affiliation": "Leiden University",
88-
"name": "Ferrari, Guilherme"
89-
},
90-
{
91-
"affiliation": "University of Amsterdam",
92-
"name": "Toonen, Silvia"
93-
},
94-
{
95-
"affiliation": "Nvidia",
96-
"name": "Gaburov, Evghenii"
97-
},
98-
{
99-
"affiliation": "TNO",
100-
"name": "Paardekooper, Jan-Pieter"
101-
},
102-
{
103-
"affiliation": "University of Cambridge",
104-
"name": "Janes, Jurgen"
105-
},
106-
{
107-
"affiliation": "University of Groningen",
108-
"name": "Punzo, Davide"
109-
},
110-
{
111-
"affiliation": "Quintel Intellegence",
112-
"name": "Kruip, Chael"
113-
},
114-
{
115-
"affiliation": "Georgia Institute of Technology",
116-
"name": "Altay, Gabriel"
117-
}
118-
],
119-
"description": "A Python framework to combine existing astrophysical simulation codes in numerical experiments. With AMUSE you can simulate objects such as star clusters, proto-planetary disks and galaxies.",
120-
"keywords": [
121-
"astronomy",
122-
"multi-model simulation",
123-
"model coupling",
124-
"physics"
125-
],
126-
"license": {
127-
"id": "Apache-2.0"
128-
},
129-
"title": "AMUSE: the Astrophysical Multipurpose Software Environment"
2+
"creators": [
3+
{
4+
"affiliation": "Leiden University",
5+
"name": "Portegies Zwart, Simon",
6+
"orcid": "0000-0001-5839-0302"
7+
},
8+
{
9+
"affiliation": "Leiden University",
10+
"name": "van Elteren, Arjen"
11+
},
12+
{
13+
"affiliation": "Netherlands eScience Center",
14+
"name": "Pelupessy, Inti"
15+
},
16+
{
17+
"affiliation": "Drexel University",
18+
"name": "McMillan, Steve"
19+
},
20+
{
21+
"affiliation": "Universiteit van Amsterdam",
22+
"name": "Rieder, Steven",
23+
"orcid": "0000-0003-3688-5798"
24+
},
25+
{
26+
"affiliation": "Leiden University",
27+
"name": "de Vries, Nathan"
28+
},
29+
{
30+
"affiliation": "Leiden University",
31+
"name": "Marosvolgyi, Marcell"
32+
},
33+
{
34+
"affiliation": "Drexel University",
35+
"name": "Whitehead, Alfred"
36+
},
37+
{
38+
"affiliation": "Drexel University",
39+
"name": "Wall, Joshua"
40+
},
41+
{
42+
"affiliation": "Netherlands eScience Center",
43+
"name": "Drost, Niels",
44+
"orcid": "0000-0001-9795-7981"
45+
},
46+
{
47+
"affiliation": "Leiden University",
48+
"name": "Jilkova, Lucie"
49+
},
50+
{
51+
"affiliation": "Leiden University",
52+
"name": "Martinez Barbosa, Carmen"
53+
},
54+
{
55+
"affiliation": "Leiden University",
56+
"name": "van der Helm, Edwin"
57+
},
58+
{
59+
"affiliation": "Leiden University",
60+
"name": "Beedorf, Jeroen"
61+
},
62+
{
63+
"affiliation": "Netherlands eScience Center",
64+
"name": "Bos, Patrick"
65+
},
66+
{
67+
"affiliation": "Leiden University",
68+
"name": "Boekholt, Tjarda"
69+
},
70+
{
71+
"affiliation": "Netherlands eScience Center",
72+
"name": "van Werkhoven, Ben"
73+
},
74+
{
75+
"affiliation": "Leiden University",
76+
"name": "Wijnen, Thomas"
77+
},
78+
{
79+
"affiliation": "Institute for Advanced Study",
80+
"name": "Hamers, Adrian"
81+
},
82+
{
83+
"affiliation": "Booking.com",
84+
"name": "Caputo, Daniel"
85+
},
86+
{
87+
"affiliation": "Leiden University",
88+
"name": "Ferrari, Guilherme"
89+
},
90+
{
91+
"affiliation": "University of Amsterdam",
92+
"name": "Toonen, Silvia"
93+
},
94+
{
95+
"affiliation": "Nvidia",
96+
"name": "Gaburov, Evghenii"
97+
},
98+
{
99+
"affiliation": "TNO",
100+
"name": "Paardekooper, Jan-Pieter"
101+
},
102+
{
103+
"affiliation": "University of Cambridge",
104+
"name": "Janes, Jurgen"
105+
},
106+
{
107+
"affiliation": "University of Groningen",
108+
"name": "Punzo, Davide"
109+
},
110+
{
111+
"affiliation": "Quintel Intellegence",
112+
"name": "Kruip, Chael"
113+
},
114+
{
115+
"affiliation": "Georgia Institute of Technology",
116+
"name": "Altay, Gabriel"
117+
}
118+
],
119+
"description": "A Python framework to combine existing astrophysical simulation codes in numerical experiments. With AMUSE you can simulate objects such as star clusters, proto-planetary disks and galaxies.",
120+
"keywords": [
121+
"astronomy",
122+
"multi-model simulation",
123+
"model coupling",
124+
"physics"
125+
],
126+
"license": {
127+
"id": "Apache-2.0"
128+
},
129+
"title": "AMUSE: the Astrophysical Multipurpose Software Environment"
130130
}

CITATION.cff

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ authors:
2323
family-names: McMillan
2424
given-names: Steve
2525
-
26-
affiliation: "KU Leuven"
26+
affiliation: "Universiteit van Amsterdam"
2727
family-names: Rieder
2828
given-names: Steven
2929
orcid: "https://orcid.org/0000-0003-3688-5798"
@@ -126,12 +126,11 @@ authors:
126126
cff-version: 1.2.0
127127
doi: "10.5281/zenodo.1435860"
128128
keywords:
129-
- astronomy
129+
- "astronomy"
130130
- "multi-model simulation"
131131
- "model coupling"
132-
- physics
132+
- "physics"
133133
license: "Apache-2.0"
134134
message: "This is the software citation for the framework code. If you publish work with AMUSE please cite also the code papers of the components used."
135135
repository-code: "https://github.com/amusecode/amuse"
136136
title: "AMUSE: the Astrophysical Multipurpose Software Environment"
137-
...

src/amuse/community/seba/download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def new_option_parser():
9393
result = OptionParser()
9494
result.add_option(
9595
"--seba-version",
96-
default='94e9b1d6ba1466d288a12e3afaa1eba5bca6ddca',
96+
default='a6f4b64f852249a0b66d52aa6f276be517dccb64',
9797
dest="seba_version",
9898
help="SeBa commit hash to download",
9999
type="string"

src/amuse/community/seba/interface.cc

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
// AMUSE STOPPING CONDITIONS SUPPORT
77
#include <stopcond.h>
88

9+
// Get std::xxx to match SeBa commit 382b590
10+
// #include <stdinc.h>
11+
912
#include <map>
1013

1114
static node * seba_root = 0;
1215
static node * seba_insertion_point = 0;
1316
static int next_seba_id = 1;
14-
static map<int, nodeptr> mapping_from_id_to_node;
17+
static std::map<int, nodeptr> mapping_from_id_to_node;
1518
static double seba_metallicity = 0.02;
1619
static double seba_time = 0.0;
1720
static stellar_type start_type = Main_Sequence;
@@ -39,8 +42,8 @@ local void addbinary(
3942

4043
id = bi->get_index();
4144

42-
// cerr << "Adding binary to "<< id << " at time = "
43-
// << stellar_time << endl;
45+
cerr << "Adding binary to "<< id << " at time = "
46+
<< stellar_time << endl;
4447

4548
double_star* new_double
4649
= new_double_star(bi, sma, ecc, stellar_time, id, type);
@@ -50,7 +53,8 @@ local void addbinary(
5053
// Give the new binary the old star_story.
5154

5255
new_double->set_star_story(old_story);
53-
56+
// Assure that SeBa prints zero-age binary parameters (SPZ+FK Febr2025).
57+
new_double->dump("SeBa.data", true);
5458

5559
}
5660
else {
@@ -453,8 +457,9 @@ int new_particle(int * index_of_the_star, double mass){
453457
new_node->set_elder_sister(seba_insertion_point);
454458
seba_insertion_point = new_node;
455459
}
456-
457-
addstar(new_node, seba_time, start_type, seba_metallicity, 0, false);
460+
461+
addstar(new_node, seba_time, start_type, seba_metallicity, 0, false, start_type, mass, mass, 0, 0, 0);
462+
458463
new_node->get_starbase()->set_time_offset(seba_time);
459464
*index_of_the_star = next_seba_id;
460465

@@ -505,7 +510,7 @@ int new_advanced_particle(int * index_of_the_star, double mass, double relative
505510

506511
int delete_star(int index_of_the_star){
507512

508-
map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
513+
std::map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
509514
if(i == mapping_from_id_to_node.end()) {
510515
return -1;
511516
} else {
@@ -531,7 +536,7 @@ int recommit_particles(){
531536

532537
node * get_seba_node_from_index(int index_of_the_star, int * errorcode)
533538
{
534-
map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
539+
std::map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
535540
if(i == mapping_from_id_to_node.end()) {
536541
*errorcode = -1;
537542
return 0;
@@ -916,6 +921,15 @@ int new_binary(
916921
child2->set_elder_sister(child1);
917922
child1->set_parent(new_node);
918923
child2->set_parent(new_node);
924+
// We cannot access the stellar parameters from here, because the starbase class is in between.
925+
// SPZ*FK Febr.2025
926+
//cerr << "Set stelar id in new binary interface."<<endl;
927+
//cerr << "Current interface "<< child1->get_star_id()<<"and "<< child1->get_star_id()<<endl;
928+
//child2->set_star_id(1);
929+
// set stellar id's
930+
//child1->set_star_id(0);
931+
//child2->set_star_id(1);
932+
919933

920934
addbinary(new_node, seba_time, binary_start_type, semi_major_axis, eccentricity);
921935

@@ -929,7 +943,7 @@ int new_binary(
929943

930944
int delete_binary(int index_of_the_star){
931945

932-
map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
946+
std::map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
933947
if(i == mapping_from_id_to_node.end()) {
934948
return -1;
935949
} else {
@@ -997,7 +1011,7 @@ int get_children_of_binary(
9971011

9981012
*child1_index = -1;
9991013
*child2_index = -1;
1000-
map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
1014+
std::map<int, nodeptr>::iterator i = mapping_from_id_to_node.find(index_of_the_star);
10011015
if(i == mapping_from_id_to_node.end()) {
10021016
return -1;
10031017
} else {

0 commit comments

Comments
 (0)