diff --git a/CMakeLists.txt b/CMakeLists.txt index e2ac3d1a2351e05061e897249bee425b774fbbdb..5d8497cbecea856af25a853ce399fe69ec0d63ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,3 +39,4 @@ include_directories(${CMAKE_SOURCE_DIR}) add_subdirectory(mechanisms) add_subdirectory(src) add_subdirectory(tests) + diff --git a/src/algorithms.hpp b/src/algorithms.hpp index b3943c688b33b7a2114f2dc88d2f3d22905d273c..83eeaf8dd7e32f776384d0c47fec5e5d0b43d1a8 100644 --- a/src/algorithms.hpp +++ b/src/algorithms.hpp @@ -1,8 +1,7 @@ #pragma once -#include <iostream> - #include <algorithm> +#include <iostream> #include <numeric> #include <type_traits> #include <vector> diff --git a/src/cell.hpp b/src/cell.hpp index fece134947041d705564008e54be61ce93d50f60..98b871cb193ee09a595416128e6342b84fa028b9 100644 --- a/src/cell.hpp +++ b/src/cell.hpp @@ -5,9 +5,9 @@ #include <thread> #include <vector> -#include <segment.hpp> -#include <cell_tree.hpp> -#include <stimulus.hpp> +#include "segment.hpp" +#include "cell_tree.hpp" +#include "stimulus.hpp" namespace nest { namespace mc { diff --git a/src/cell_tree.hpp b/src/cell_tree.hpp index 43fac2429a657545251159a3fa97002b7243fe86..fab1163b1bbf9b8c43dbf954b4a7081c4e9dcc7f 100644 --- a/src/cell_tree.hpp +++ b/src/cell_tree.hpp @@ -9,7 +9,7 @@ #include <ostream> #include <vector> -#include "vector/include/Vector.hpp" +#include <vector/include/Vector.hpp> #include "tree.hpp" #include "util.hpp" diff --git a/src/fvm.hpp b/src/fvm.hpp index 69d23d0d1fe97e341ad8de3dc25ce8c0771ef78c..d0c6f90272ee5f48fc7727a1aab519e3bebe5fdc 100644 --- a/src/fvm.hpp +++ b/src/fvm.hpp @@ -4,20 +4,19 @@ #include <map> #include <string> #include <vector> - -#include <algorithms.hpp> -#include <cell.hpp> -#include <ion.hpp> -#include <math.hpp> -#include <matrix.hpp> -#include <mechanism.hpp> -#include <mechanism_interface.hpp> -#include <util.hpp> -#include <segment.hpp> -#include <stimulus.hpp> - #include <vector/include/Vector.hpp> +#include "algorithms.hpp" +#include "cell.hpp" +#include "ion.hpp" +#include "math.hpp" +#include "matrix.hpp" +#include "mechanism.hpp" +#include "mechanism_interface.hpp" +#include "segment.hpp" +#include "stimulus.hpp" +#include "util.hpp" + namespace nest { namespace mc { namespace fvm { diff --git a/src/ion.hpp b/src/ion.hpp index 311e86003b4cfba2b4cd4ceb569fc97a346daca0..8f526ade3358dac54722f3bfd96a003870412623 100644 --- a/src/ion.hpp +++ b/src/ion.hpp @@ -1,6 +1,7 @@ #pragma once #include <vector/include/Vector.hpp> + #include "indexed_view.hpp" namespace nest { diff --git a/src/math.hpp b/src/math.hpp index 86eccfce67e7f53fe6645b15808c201c88634e19..006a429e06372412c1fa5dd7d84401a4df4e68f4 100644 --- a/src/math.hpp +++ b/src/math.hpp @@ -1,7 +1,8 @@ #pragma once -#include <utility> #include <cmath> +#include <utility> + namespace nest { namespace mc { diff --git a/src/matrix.hpp b/src/matrix.hpp index db9d2df7f56e8bfffb73051e996acb13d9fa0369..e86c9b897b66a529252721b739ae20f96cfa16ae 100644 --- a/src/matrix.hpp +++ b/src/matrix.hpp @@ -1,11 +1,10 @@ #pragma once #include <type_traits> +#include <vector/include/Vector.hpp> #include "util.hpp" -#include <vector/include/Vector.hpp> - namespace nest { namespace mc { diff --git a/src/mechanism.hpp b/src/mechanism.hpp index ea69c292e1f5c50efe0fd0e6e7dbf092c32b16fb..7a06a7330e06bb14000e7c262c3db55fe4dc7135 100644 --- a/src/mechanism.hpp +++ b/src/mechanism.hpp @@ -1,14 +1,12 @@ #pragma once -#pragma once - #include <memory> #include <string> #include "indexed_view.hpp" +#include "ion.hpp" #include "parameter_list.hpp" #include "util.hpp" -#include "ion.hpp" namespace nest { namespace mc { diff --git a/src/mechanism_interface.cpp b/src/mechanism_interface.cpp index 10fad45fa0d9776c4f45302e6bf196f995765e99..f44d1f561d3efcc51b262b5bb32e0a95084bbcb5 100644 --- a/src/mechanism_interface.cpp +++ b/src/mechanism_interface.cpp @@ -7,6 +7,7 @@ #include <mechanisms/hh.hpp> #include <mechanisms/pas.hpp> + namespace nest { namespace mc { namespace mechanisms { diff --git a/src/segment.hpp b/src/segment.hpp index decb0cdd88665c421cf159b8d7f49e4f91e03f0f..c6c49b26a946d36fdc969d9473fa07105d30d4af 100644 --- a/src/segment.hpp +++ b/src/segment.hpp @@ -1,14 +1,13 @@ #pragma once #include <cmath> - #include <vector> +#include "algorithms.hpp" #include "compartment.hpp" #include "math.hpp" #include "parameter_list.hpp" #include "point.hpp" -#include "algorithms.hpp" #include "util.hpp" namespace nest { diff --git a/src/swcio.cpp b/src/swcio.cpp index f96676449d9526154d4f7d0cd3531da62bba715e..792d0fc7bdb3b4898b575dae552d0347efd85e9c 100644 --- a/src/swcio.cpp +++ b/src/swcio.cpp @@ -4,10 +4,10 @@ #include <sstream> #include <unordered_set> -#include <algorithms.hpp> -#include <point.hpp> -#include <swcio.hpp> -#include <util.hpp> +#include "algorithms.hpp" +#include "point.hpp" +#include "swcio.hpp" +#include "util.hpp" namespace nest { namespace mc { diff --git a/src/swcio.hpp b/src/swcio.hpp index a58bbac9aee9a32c03ae9bb33eb9289782a537b2..70f979cda362f503a81965c274a5cdeb23ea5056 100644 --- a/src/swcio.hpp +++ b/src/swcio.hpp @@ -6,8 +6,8 @@ #include <string> #include <vector> -#include <cell.hpp> -#include <point.hpp> +#include "cell.hpp" +#include "point.hpp" namespace nest { namespace mc { diff --git a/src/tree.hpp b/src/tree.hpp index d517f7e4570fc9278bab22ff974a3baaa964ea50..be96e3619424ec54b143e694108188419802e67b 100644 --- a/src/tree.hpp +++ b/src/tree.hpp @@ -1,12 +1,11 @@ #pragma once #include <algorithm> +#include <cassert> #include <numeric> #include <vector> +#include <vector/include/Vector.hpp> -#include <cassert> - -#include "vector/include/Vector.hpp" #include "algorithms.hpp" #include "util.hpp" diff --git a/src/util.hpp b/src/util.hpp index afa029ff9cfcba65258473875003c00f58c3d16b..c4362b25d0ad9e54e962b118e84ce974b422a636 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -1,6 +1,6 @@ #pragma once -#include "vector/include/Vector.hpp" +#include <vector/include/Vector.hpp> #ifdef DEBUG #define EXPECTS(expression) assert(expression) diff --git a/tests/test_algorithms.cpp b/tests/test_algorithms.cpp index f69569c9611068250cc3265524cfe64e1e10bd55..584bdf8ad10db170b44604d3db8f8047d3c29860 100644 --- a/tests/test_algorithms.cpp +++ b/tests/test_algorithms.cpp @@ -1,9 +1,9 @@ -#include "gtest.h" - #include <vector> -#include <algorithms.hpp> -#include <util.hpp> +#include "gtest.h" +#include "util.hpp" + +#include "../src/algorithms.hpp" TEST(algorithms, sum) { diff --git a/tests/test_matrix.cpp b/tests/test_matrix.cpp index 73663d6815d876e1740da4cee084c46255a74e3f..f74b47985649101a5bd4c79c07a911ed65b85c8b 100644 --- a/tests/test_matrix.cpp +++ b/tests/test_matrix.cpp @@ -1,10 +1,10 @@ #include <numeric> +#include <vector> #include "gtest.h" -#include <matrix.hpp> -#include <math.hpp> -#include <vector/include/Vector.hpp> +#include "../src/math.hpp" +#include "../src/matrix.hpp" TEST(matrix, construct_from_parent_only) { diff --git a/tests/test_mechanisms.cpp b/tests/test_mechanisms.cpp index d61c89d20b40136044dfd7556157b68947d8e56f..aef84890275263ca7ef9570c1017864736a6f331 100644 --- a/tests/test_mechanisms.cpp +++ b/tests/test_mechanisms.cpp @@ -1,7 +1,7 @@ #include "gtest.h" -#include <mechanism_interface.hpp> -#include <matrix.hpp> +#include "../src/mechanism_interface.hpp" +#include "../src/matrix.hpp" TEST(mechanisms, helpers) { nest::mc::mechanisms::setup_mechanism_helpers(); diff --git a/tests/test_parameters.cpp b/tests/test_parameters.cpp index 0dce58b0c5472de6db9d721ad78dece7a9b3de94..8a4b0d200785036d727fda4cae698a7950fbf040 100644 --- a/tests/test_parameters.cpp +++ b/tests/test_parameters.cpp @@ -1,10 +1,9 @@ - #include <fstream> #include "gtest.h" #include "util.hpp" -#include <parameter_list.hpp> +#include "../src/parameter_list.hpp" // test out the parameter infrastructure TEST(parameters, setting) diff --git a/tests/test_point.cpp b/tests/test_point.cpp index b5bfeb9c1783a6c921ca97f3eb6ae4afd535c311..27b5bf705ee2224f0dd1d12a18824d3b5d170b71 100644 --- a/tests/test_point.cpp +++ b/tests/test_point.cpp @@ -1,5 +1,5 @@ -#include <limits> #include <cmath> +#include <limits> #include "gtest.h" diff --git a/tests/test_segment.cpp b/tests/test_segment.cpp index 9c3df625db9ef87110474d35a5ce88f3f4e07f09..490f0e5ece7b8956de830029bf1188c4f912b7c6 100644 --- a/tests/test_segment.cpp +++ b/tests/test_segment.cpp @@ -4,7 +4,6 @@ #include "../src/segment.hpp" - TEST(segments, soma) { using namespace nest::mc; diff --git a/tests/test_swcio.cpp b/tests/test_swcio.cpp index 6968fd432a89842023807c8ed0ffb2ca8140b231..c3fc24d3926c86abd1ed3be760c1c6f5b7316ced 100644 --- a/tests/test_swcio.cpp +++ b/tests/test_swcio.cpp @@ -8,8 +8,8 @@ #include "gtest.h" -#include <cell.hpp> -#include <swcio.hpp> +#include "../src/cell.hpp" +#include "../src/swcio.hpp" // SWC tests void expect_record_equals(const nest::mc::io::swc_record &expected, diff --git a/tests/test_tree.cpp b/tests/test_tree.cpp index a468d80ca8d4a61804d4fd0e242cad466bff8f8c..c27c1674adbb4c5314be9ad0f4d65b80b06a2677 100644 --- a/tests/test_tree.cpp +++ b/tests/test_tree.cpp @@ -1,12 +1,12 @@ -#include <iostream> #include <fstream> +#include <iostream> +#include <json/src/json.hpp> #include <numeric> #include <vector> #include "gtest.h" -#include <cell_tree.hpp> -#include "json/src/json.hpp" +#include "../src/cell_tree.hpp" using json = nlohmann::json; using range = memory::Range; diff --git a/tests/util.hpp b/tests/util.hpp index aeb2f8d3e585a1603de6c7745b566a8b11aee12c..6252c7e439b334342c14b17285418a0e1f7a1c63 100644 --- a/tests/util.hpp +++ b/tests/util.hpp @@ -1,14 +1,13 @@ +#include <chrono> +#include <cmath> #include <fstream> +#include <iomanip> #include <iostream> #include <string> #include <vector> -#include <iomanip> -#include <chrono> -#include <cmath> - -#include <util.hpp> #include <json/src/json.hpp> +#include <util.hpp> // helpful code for running tests // a bit messy: refactor when it gets heavier and obvious patterns emerge... diff --git a/tests/validate_ball_and_stick.cpp b/tests/validate_ball_and_stick.cpp index a2aef0ada111aa7ecb8d150034a437016e987ce1..1a9bddb7e3aaa031cbf4212e0c1898767f3682bb 100644 --- a/tests/validate_ball_and_stick.cpp +++ b/tests/validate_ball_and_stick.cpp @@ -1,12 +1,11 @@ #include <fstream> +#include <json/src/json.hpp> #include "gtest.h" #include "util.hpp" -#include <cell.hpp> -#include <fvm.hpp> - -#include <json/src/json.hpp> +#include "../src/cell.hpp" +#include "../src/fvm.hpp" // compares results with those generated by nrn/ball_and_stick.py TEST(ball_and_stick, neuron_baseline) diff --git a/tests/validate_soma.cpp b/tests/validate_soma.cpp index b65b4ecb3a0de12d475c6380b24b43b824b65599..44d8235a4463e153c87fa58b325b7694440ed3a1 100644 --- a/tests/validate_soma.cpp +++ b/tests/validate_soma.cpp @@ -1,12 +1,11 @@ #include <fstream> +#include <json/src/json.hpp> #include "gtest.h" #include "util.hpp" -#include <cell.hpp> -#include <fvm.hpp> - -#include <json/src/json.hpp> +#include "../src/cell.hpp" +#include "../src/fvm.hpp" // compares results with those generated by nrn/soma.py // single compartment model with HH channels