ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
short_range_verlet.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025-2026 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo 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 * ESPResSo 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// Sole instantiation site of the update_cabana_state AoSoA-commit /
21// Verlet-list-build template for VerletCriterion<>. forces.cpp, energy.cpp and
22// pressure.cpp used to each instantiate this giant (identical each time); they
23// now call the non-template wrapper below so the build-lambda instantiations
24// exist ONLY here.
25
27
28#include <config/config.hpp>
29
35#include "system/System.hpp"
36
38
40 double const collision_cut) {
41 auto &cell_structure = *system.cell_structure;
42 auto const skin = cell_structure.get_verlet_skin();
43 auto const coulomb_cut = system.coulomb.cutoff();
44 auto const dipolar_cut = system.dipoles.cutoff();
45 auto const pair_cutoff = system.get_interaction_range();
46 auto const integ_switch = system.propagation->integ_switch;
47 // When no electrostatics/dipolar/collision cutoff is active, build the
48 // criterion variant that compiles those dead per-candidate branches out of
49 // the build loop; otherwise the full one. pair_cutoff is the interaction
50 // range, which is also the criterion's maximum cutoff. Both
51 // update_cabana_state instantiations live in this single TU. The criterion
52 // is handed over as a factory so its O(n_types^2) cutoff table is only
53 // built when the Verlet list is actually rebuilt.
57 if (short_range_only) {
58 auto const make_criterion = [&] {
61 };
63 integ_switch);
64 } else {
65 auto const make_criterion = [&] {
68 };
70 integ_switch);
71 }
72}
Main system class.
Returns true if the particles are to be considered for short range interactions.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
constexpr double inactive_cutoff
Special cutoff value for an inactive interaction.
Definition config.hpp:53
ESPRESSO_ATTR_ALWAYS_INLINE void update_cabana_state(CellStructure &cell_structure, auto const &make_verlet_criterion, double const pair_cutoff, auto const integ_switch)
void update_verlet_state(System::System const &system, double const collision_cut)