forked from PrincetonUniversity/athena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path22.cleanup_and_mpi.patch
165 lines (149 loc) · 4.88 KB
/
22.cleanup_and_mpi.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
diff --git a/.travis.yml b/.travis.yml
index 07d9d899..1c8337f3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,9 +3,7 @@
language: cpp
branches:
only:
- - master
- - dust
- - mhd4_3D
+ - snap-mods
# Default build matrix is 4x Ubuntu builds (inherit the default stage name "test"):
os:
- linux
diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt
index d3f498ef..5c64ee66 100644
--- a/bench/CMakeLists.txt
+++ b/bench/CMakeLists.txt
@@ -8,25 +8,27 @@ string(TOUPPER ${CMAKE_BUILD_TYPE} buildu)
add_executable(shock_tube.${buildl} main.cpp shock_tube.cpp dummy.cpp)
set_target_properties(shock_tube.${buildl}
- PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
- COMPILE_FLAGS ${CMAKE_CXX_FLAGS_${buildu}}
- )
+ PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+ COMPILE_FLAGS ${CMAKE_CXX_FLAGS_${buildu}}
+ )
target_link_libraries(shock_tube.${buildl}
- ${ATHENAPP_LIBRARY_${buildu}}
- )
+ ${ATHENAPP_LIBRARY_${buildu}}
+ ${MPI_CXX_LIBRARIES}
+ )
target_include_directories(shock_tube.${buildl}
- PRIVATE
- ${ATHENAPP_INCLUDE_DIR}
- )
+ PRIVATE
+ ${ATHENAPP_INCLUDE_DIR}
+ ${MPI_CXX_INCLUDE_PATH}
+ )
# copy input files to build directory
file(GLOB infiles athinput.*)
foreach(infile ${infiles})
- get_filename_component(name ${infile} NAME)
- configure_file(${infile}
- ${CMAKE_BINARY_DIR}/bin/${name} COPYONLY
- )
+ get_filename_component(name ${infile} NAME)
+ configure_file(${infile}
+ ${CMAKE_BINARY_DIR}/bin/${name} COPYONLY
+ )
endforeach()
diff --git a/cmake/parameters.cmake b/cmake/parameters.cmake
index 6fc32363..869befaa 100644
--- a/cmake/parameters.cmake
+++ b/cmake/parameters.cmake
@@ -67,6 +67,10 @@ SET_IF_EMPTY(FFT_OPTION "NO_FFT")
# MPI parallelization (MPI_PARALLEL or NOT_MPI_PARALLEL)
SET_IF_EMPTY(MPI_OPTION "NOT_MPI_PARALLEL")
+IF(MPI_OPTION STREQUAL "MPI_PARALLEL")
+ find_package(MPI REQUIRED)
+endif()
+
# OpenMP parallelization (OPENMP_PARALLEL or NOT_OPENMP_PARALLEL)
SET_IF_EMPTY(OPENMP_OPTION "NOT_OPENMP_PARALLEL")
@@ -111,8 +115,8 @@ SET_IF_EMPTY(NUMBER_GHOST_CELLS 2)
math(EXPR NHYDRO_VARIABLES "5 + ${NVAPOR}")
math(EXPR NWAVE_VALUE "5 + ${NVAPOR}")
-SET_IF_EMPTY(NCLOUDS 0)
-SET_IF_EMPTY(NTRACER 0)
+SET_IF_EMPTY(NCLOUD 0)
SET_IF_EMPTY(NCHEMISTRY 0)
+SET_IF_EMPTY(NTRACER 0)
-math(EXPR NUMBER_PASSIVE_SCALARS "${NCLOUDS} + ${NTRACER} + ${NCHEMISTRY}")
+math(EXPR NUMBER_PASSIVE_SCALARS "${NCLOUD} + ${NCHEMISTRY} + ${NTRACER}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ecdb67f3..d155490f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,8 +28,6 @@ set(EOS_FILE ${EOS_FILE}.cpp)
set(RSOLVER_FILE ${RSOLVER_FILE}.cpp)
set(PROBLEM_FILE ${PROBLEM_FILE}.cpp)
-message(STATUS ${RSOLVER_DIR}${RSOLVER_FILE})
-
# source files are defined in Makefile.in
file(GLOB src_files
*.cpp
@@ -71,24 +69,6 @@ file(GLOB src_files
# remove main file
list(FILTER src_files EXCLUDE REGEX ".*/src/main\\.cpp$")
-# user mod calcualte_fluxes
-if (EXISTS "${CMAKE_SOURCE_DIR}/athena_mod/hydro/calculate_fluxes.cpp")
- message(STATUS "Found calculate_fluxes.cpp in ${CMAKE_SOURCE_DIR}/athena_mod/hydro/calculate_fluxes.cpp")
- list(FILTER src_files EXCLUDE REGEX ".*/src/hydro/calculate_fluxes\\.cpp$")
-endif()
-
-# user mod new_blockdt
-if (EXISTS "${CMAKE_SOURCE_DIR}/athena_mod/hydro/new_blockdt.cpp")
- message(STATUS "Found new_blockdt.cpp in ${CMAKE_SOURCE_DIR}/athena_mod/hydro/new_blockdt.cpp")
- list(FILTER src_files EXCLUDE REGEX ".*/src/hydro/new_blockdt\\.cpp$")
-endif()
-
-# user mod outputs delegates
-if (EXISTS "${CMAKE_SOURCE_DIR}/athena_mod/outputs/outputs.cpp")
- message(STATUS "Found outputs.cpp in ${CMAKE_SOURCE_DIR}/athena_mod/outputs/outputs.cpp")
- list(FILTER src_files EXCLUDE REGEX ".*/src/outputs/outputs\\.cpp$")
-endif()
-
string(TOLOWER ${CMAKE_BUILD_TYPE} buildl)
string(TOUPPER ${CMAKE_BUILD_TYPE} buildu)
diff --git a/src/mesh/mesh.hpp b/src/mesh/mesh.hpp
index 01ff45d5..4144da63 100644
--- a/src/mesh/mesh.hpp
+++ b/src/mesh/mesh.hpp
@@ -143,9 +143,6 @@ class MeshBlock {
void UserWorkInLoop(); // called in TimeIntegratorTaskList
// opaque pointer
- class IndexMap;
- std::shared_ptr<IndexMap> pindex;
-
class Impl;
std::shared_ptr<Impl> pimpl;
diff --git a/src/reconstruct/interpolation.hpp b/src/reconstruct/interpolation.hpp
index 6162a7c1..5b503fdc 100644
--- a/src/reconstruct/interpolation.hpp
+++ b/src/reconstruct/interpolation.hpp
@@ -5,21 +5,9 @@
// Athena++
#include "../defs.hpp"
-//#include "../math/core.h"
#define sqr(x) ( (x)*(x) )
-/* 2-nd order plm for non-uniform grid
-template<typename T>
-inline T interp_plm(T phim1, T phi, T phip1, Real dxl, Real dx) {
- Real dwl = phi - phim1;
- Real dwr = phip1 - phi;
- Real dw2 = dwl*dwr;
- Real dwm = 2.0*dw2/(dwl + dwr);
- if (dw2 <= 0.0) dwm = 0.0;
- return phi - dxl/dx*dwm;
-}*/
-
// limiter
template<typename T>
inline T minmod(T a, T b) {