Skip to content

Commit ee3838a

Browse files
author
Dominic Marcello
committed
Added CMakeLists.txt
1 parent c9b3fe4 commit ee3838a

8 files changed

Lines changed: 1286 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -march=native")
3+
4+
add_executable( fmm_test
5+
src/main.cpp
6+
src/multipole.cpp
7+
src/expansion.cpp
8+
)
9+

README

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
-----------------------------------------------------
3+
Copyright (c) 2016 Dominic C. Marcello
4+
-----------------------------------------------------
5+
6+
7+
This code will compile under g++ using the command:
8+
9+
g++ *.cpp -std=c++11
10+
11+
12+
NOTE: To enable the angular momentum conservation feature, define "CORRECTION_ON". To enable the optimized version of the correction,
13+
define "CORRECTION_ON" and "CORRECTION_OPTIMIZE." See defs.hpp.

src/defs.hpp

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
3+
/*
4+
Copyright (c) 2016 Dominic C. Marcello
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
21+
#ifndef DEFS_H_
22+
#define DEFS_H_
23+
24+
#include <array>
25+
26+
#define CORRECTION_ON
27+
//#define CORRECTION_OPTIMIZE
28+
29+
using real = double;
30+
using integer = long long;
31+
32+
constexpr integer NDIM = 3;
33+
constexpr integer ncrit = 8;
34+
constexpr integer nparts = 100000;
35+
constexpr integer nchild = 8;
36+
constexpr integer LP = 20;
37+
38+
#ifdef CORRECTION_ON
39+
constexpr integer MP = 17;
40+
#else
41+
constexpr integer MP = 7;
42+
#endif
43+
44+
using space_vector = std::array<real,3>;
45+
46+
#endif /* DEFS_H_ */

0 commit comments

Comments
 (0)