Skip to content

Commit 980aae5

Browse files
author
Matthew West
committed
create arepo interface.h and move #include allvars.h & proto.h along with ifdef Cpp choice there
1 parent 2f92967 commit 980aae5

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

src/amuse/community/arepo/interface.cc

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

55
#include "worker_code.h"
66

7-
#include "src/main/allvars.h"
8-
#include "src/main/proto.h"
9-
10-
#ifdef __cplusplus
11-
extern "C" {
12-
#endif
137

148
// general interface functions:
159

@@ -136,12 +130,6 @@ int initialize_code(){
136130

137131
determine_compute_nodes();
138132

139-
for(PTask = 0; NTask > (1 << PTask); PTask++)
140-
;
141-
142-
begrun0();
143-
144-
RestartFlag = 0;
145133

146134
set_default_parameters();
147135
begrun1(); /* set-up run */
@@ -354,6 +342,5 @@ int set_velocity(int index_of_the_particle, double vx, double vy,
354342
double vz){
355343
return 0;
356344
}
357-
#ifdef __cplusplus
358-
}
359-
#endif
345+
346+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifdef __cplusplus
2+
extern "C" {
3+
#endif
4+
5+
#include "src/allvars.h"
6+
#include "src/proto.h"
7+
8+
#ifdef __cplusplus
9+
}
10+
#endif

src/amuse/community/arepo/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ArepoInterface(
2323
.. [#] Weinberger, R., Springel, V., Pakmor, R., 2020, ApJS, 248, 32 (Public Code Release) [2020ApJS..248...32W]
2424
"""
2525

26-
include_headers = ["worker_code.h"]
26+
include_headers = ["worker_code.h", "inteface.h"]
2727

2828
def __init__(self, **keyword_arguments):
2929
CodeInterface.__init__(self, name_of_the_worker="arepo_worker", **keyword_arguments)

0 commit comments

Comments
 (0)