Split lines with many copyright years
[alexxy/gromacs.git] / src / gromacs / nbnxm / kernels_reference / kernel_ref.cpp
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
5  * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
6  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
7  * and including many others, as listed in the AUTHORS file in the
8  * top-level source directory and at http://www.gromacs.org.
9  *
10  * GROMACS is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public License
12  * as published by the Free Software Foundation; either version 2.1
13  * of the License, or (at your option) any later version.
14  *
15  * GROMACS is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with GROMACS; if not, see
22  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
24  *
25  * If you want to redistribute modifications to GROMACS, please
26  * consider that scientific software is very special. Version
27  * control is crucial - bugs must be traceable. We will be happy to
28  * consider code for inclusion in the official distribution, but
29  * derived work must not be called official GROMACS. Details are found
30  * in the README & COPYING files - if they are missing, get the
31  * official version at http://www.gromacs.org.
32  *
33  * To help us fund GROMACS development, we humbly ask that you cite
34  * the research papers on the package. Check out http://www.gromacs.org.
35  */
36 #include "gmxpre.h"
37
38 #include "kernel_ref.h"
39
40 #include <cassert>
41 #include <cmath>
42
43 #include <algorithm>
44
45 #include "gromacs/math/functions.h"
46 #include "gromacs/math/vec.h"
47 #include "gromacs/mdlib/gmx_omp_nthreads.h"
48 #include "gromacs/mdtypes/interaction_const.h"
49 #include "gromacs/mdtypes/md_enums.h"
50 #include "gromacs/nbnxm/nbnxm.h"
51 #include "gromacs/pbcutil/ishift.h"
52 #include "gromacs/utility/fatalerror.h"
53 #include "gromacs/utility/smalloc.h"
54
55 /* Analytical reaction-field kernels */
56 #define CALC_COUL_RF
57 #define LJ_CUT
58 #include "kernel_ref_includes.h"
59 #undef LJ_CUT
60 #define LJ_FORCE_SWITCH
61 #include "kernel_ref_includes.h"
62 #undef LJ_FORCE_SWITCH
63 #define LJ_POT_SWITCH
64 #include "kernel_ref_includes.h"
65 #undef LJ_POT_SWITCH
66 #define LJ_EWALD
67 #define LJ_CUT
68 #define LJ_EWALD_COMB_GEOM
69 #include "kernel_ref_includes.h"
70 #undef LJ_EWALD_COMB_GEOM
71 #define LJ_EWALD_COMB_LB
72 #include "kernel_ref_includes.h"
73 #undef LJ_EWALD_COMB_LB
74 #undef LJ_CUT
75 #undef LJ_EWALD
76 #undef CALC_COUL_RF
77
78
79 /* Tabulated exclusion interaction electrostatics kernels */
80 #define CALC_COUL_TAB
81 #define LJ_CUT
82 #include "kernel_ref_includes.h"
83 #undef LJ_CUT
84 #define LJ_FORCE_SWITCH
85 #include "kernel_ref_includes.h"
86 #undef LJ_FORCE_SWITCH
87 #define LJ_POT_SWITCH
88 #include "kernel_ref_includes.h"
89 #undef LJ_POT_SWITCH
90 #define LJ_EWALD
91 #define LJ_CUT
92 #define LJ_EWALD_COMB_GEOM
93 #include "kernel_ref_includes.h"
94 #undef LJ_EWALD_COMB_GEOM
95 #define LJ_EWALD_COMB_LB
96 #include "kernel_ref_includes.h"
97 #undef LJ_EWALD_COMB_LB
98 #undef LJ_CUT
99 #undef LJ_EWALD
100 /* Twin-range cut-off kernels */
101 #define VDW_CUTOFF_CHECK
102 #define LJ_CUT
103 #include "kernel_ref_includes.h"
104 #undef LJ_CUT
105 #define LJ_FORCE_SWITCH
106 #include "kernel_ref_includes.h"
107 #undef LJ_FORCE_SWITCH
108 #define LJ_POT_SWITCH
109 #include "kernel_ref_includes.h"
110 #undef LJ_POT_SWITCH
111 #define LJ_EWALD
112 #define LJ_CUT
113 #define LJ_EWALD_COMB_GEOM
114 #include "kernel_ref_includes.h"
115 #undef LJ_EWALD_COMB_GEOM
116 #define LJ_EWALD_COMB_LB
117 #include "kernel_ref_includes.h"
118 #undef LJ_EWALD_COMB_LB
119 #undef LJ_CUT
120 #undef LJ_EWALD
121 #undef VDW_CUTOFF_CHECK
122 #undef CALC_COUL_TAB