Skip to content

Commit 7e8302f

Browse files
Merge pull request #1354 from Iximiel/feature/linkedCellsInNL
Using LinkCells in NeigborList
2 parents 6a32fae + 53c3033 commit 7e8302f

File tree

76 files changed

+23079
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+23079
-243
lines changed

.astyle.options.orig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# long options can be written without the preceding '--'
2+
suffix=none #equivalent to "-n"
3+
style=attach
4+
add-braces
5+
indent=spaces=2
6+
break-one-line-headers
7+
8+
# old options
9+
#suffix=none
10+
#indent=spaces=2
11+
#keep-one-line-statements
12+
#keep-one-line-blocks
13+
# end old options

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DisableFormat: true

asd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Artistic Style Version 3.1

mycppcheck.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
#formatted with shfmt v3.6.0 https://github.com/mvdan/sh/releases
3+
function usage() {
4+
echo "${0#*/} Runs cppcheck ONLY on the files in src that have changed from the selected base branch"
5+
echo 'By default it uses "master" as the base branch, but you can change it with --rev=REV:'
6+
echo ""
7+
echo "usage: ${0#*/} [--base=REV] change the base branch to use as base for the diff"
8+
echo " ${0#*/} -h|--help print this help"
9+
echo ""
10+
echo "for example \`${0#*/} --base=upstream/master\`"
11+
}
12+
13+
baserev=${PLMD_MYCCPCHECK_REV:-master}
14+
15+
for arg; do
16+
case $arg in
17+
--base=*) baserev=${arg#*=} ;;
18+
-h | --help)
19+
usage
20+
exit 0
21+
;;
22+
*)
23+
usage
24+
exit 1
25+
;;
26+
esac
27+
done
28+
srcdir=$(git rev-parse --show-toplevel)
29+
30+
cd "$srcdir" >/dev/null || {
31+
echo "Could not cd to $srcdir"
32+
exit 1
33+
}
34+
35+
files=$(
36+
git diff-index --diff-filter=ACMR "$baserev" | awk '/src.*(\.h|\.cpp|\.inc\.in)/{print $6}'
37+
)
38+
# shellcheck disable=SC2086
39+
cppcheck --std=c++17 -j 4 --platform=unix64 --language=c++ \
40+
-U__GNUG__ -U__PLUMED_HAS_EXTERNAL_LAPACK -U__PLUMED_HAS_EXTERNAL_BLAS \
41+
-UGMX_CYGWIN -UF77_NO_UNDERSCORE -U_GLIBCXX_DEBUG -DNDEBUG -U__PLUMED_PBC_WHILE \
42+
-U__PLUMED_HAS_ASMJIT \
43+
-D__PLUMED_WRAPPER_CXX_EXPLICIT=explicit \
44+
--config-exclude=small_vector/ \
45+
--template='[{file}:{line}] ({severity}) :{id}: {message}' --enable=all --suppress=missingIncludeSystem --inline-suppr --force \
46+
$files

regtest/basic/rt-make-FSUM/main.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
#include "plumed/tools/Tools.h"
2+
3+
#include "testUtils.h"
4+
25
#include <iostream>
36
#include <fstream>
47
#include <iomanip>
58
#include <string>
69
using namespace PLMD;
710

8-
class tee {
9-
//TODO:: put this tee into a common test utilities lib
10-
std::ofstream ofs;
11-
public:
12-
tee(std::string filename) : ofs(filename) {}
13-
template<typename T>
14-
tee& operator<<(const T& t) {
15-
ofs<<t;
16-
std::cout <<t;
17-
return *this;
18-
}
19-
};
20-
2111
template<typename T>
2212
using FSUM=PLMD::Tools::FastStringUnorderedMap<T>;
2313

regtest/basic/rt-make-getwords/main.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
#include "plumed/tools/Tools.h"
2+
#include "testUtils.h"
23
#include <fstream>
34
#include <iomanip>
45
#include <iostream>
56

67
using namespace PLMD;
78

8-
class tee {
9-
//TODO:: put this tee into a common test utilities lib
10-
std::ofstream ofs;
11-
public:
12-
tee(std::string filename) : ofs(filename) {}
13-
template<typename T>
14-
tee& operator<<(const T& t) {
15-
ofs<<t;
16-
std::cout <<t;
17-
return *this;
18-
}
19-
};
20-
219
int main() {
2210
try {
2311
//NOTE:: We are simply checking that gw has the expected behaviour

regtest/basic/rt-make-view/main.cpp

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "plumed/tools/Stopwatch.h"
44
#include "plumed/tools/View.h"
55

6+
#include "testUtils.h"
7+
68
#include <numeric>
79
#include <fstream>
810
#include <array>
@@ -14,24 +16,6 @@
1416
using PLMD::View;
1517

1618
#define displaycall(x) #x << " = " << (x)
17-
///A very barebone tee implementation
18-
class tee {
19-
std::ofstream ofs;
20-
public:
21-
tee(std::string filename) : ofs(filename) {}
22-
template<typename T>
23-
tee& operator<<(const T& t) {
24-
ofs<<t;
25-
std::cout <<t;
26-
return *this;
27-
}
28-
template<typename Iterable>
29-
tee& dump(const Iterable& v) {
30-
std::copy(v.begin(),v.end(),std::ostream_iterator<double>(ofs," "));
31-
std::copy(v.begin(),v.end(),std::ostream_iterator<double>(std::cout," "));
32-
return *this;
33-
}
34-
};
3519

3620
void basics(tee& out);
3721
void nonspanlikeInteractions(tee& out);

regtest/basic/rt-make-view2D/main.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "plumed/tools/Stopwatch.h"
44
#include "plumed/tools/View2D.h"
55

6+
#include "testUtils.h"
7+
68
#include <numeric>
79
#include <fstream>
810
#include <array>
@@ -16,18 +18,6 @@ using PLMD::View;
1618
using PLMD::View2D;
1719

1820
#define displaycall(x) #x << " = " << (x)
19-
///A very barebone tee implementation
20-
class tee {
21-
std::ofstream ofs;
22-
public:
23-
tee(std::string filename) : ofs(filename) {}
24-
template<typename T>
25-
tee& operator<<(const T& t) {
26-
ofs<<t;
27-
std::cout <<t;
28-
return *this;
29-
}
30-
};
3121

3222
void basics(tee& out);
3323
void nonspanlikeInteractions(tee& out);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! FIELDS time s
2+
0.000000 0.0000
3+
1.000000 0.0000
4+
2.000000 0.0000
5+
3.000000 0.0000
6+
4.000000 0.0000
7+
5.000000 0.0000
8+
6.000000 0.0000
9+
7.000000 0.0000
10+
8.000000 0.0000
11+
9.000000 0.0000
12+
10.000000 0.0000
13+
11.000000 0.0000
14+
12.000000 0.0000
15+
13.000000 0.0000
16+
14.000000 0.0000
17+
15.000000 0.0000
18+
16.000000 0.0000
19+
17.000000 0.0000
20+
18.000000 0.0000
21+
19.000000 0.0000
22+
20.000000 0.0000
23+
21.000000 0.0000
24+
22.000000 0.0000
25+
23.000000 0.0000
26+
24.000000 0.0000
27+
25.000000 0.0000
28+
26.000000 0.0000

0 commit comments

Comments
 (0)