ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
LocalBondState.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 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#pragma once
21
22#include <config/config.hpp>
23
24#include <Kokkos_Core.hpp>
25
26#include <vector>
27
35
36 // Bond counts
37 int pair_count = 0;
38 int angle_count = 0;
40
41 // Kokkos bond lists
48
49#ifdef ESPRESSO_COLLISION_DETECTION
50 std::vector<int> new_pair_list, new_pair_ids;
51 std::vector<int> new_angle_list, new_angle_ids;
53#endif
54
55 void reset_counts() {
56 pair_count = 0;
57 angle_count = 0;
59 }
60
61 void set_counts(int p, int a, int d) {
62 pair_count = p;
63 angle_count = a;
65 }
66
67 /** Allocate or reallocate all Kokkos Views to current counts. */
68 void allocate();
69
70 /** Deallocates Views */
71 void clear();
72
73 /** Reset counts + collision vectors */
74 void reset();
75
76#ifdef ESPRESSO_COLLISION_DETECTION
77 void clear_new_bonds();
78 void add_new_bond(int bond_id, std::vector<int> const &particle_ids,
79 Kokkos::View<int *> const &id_to_index);
80 void rebuild();
81#endif
82};
std::vector< int > new_angle_ids
void allocate()
Allocate or reallocate all Kokkos Views to current counts.
AngleBondIDType angle_ids
std::vector< int > new_dihedral_list
DihedralBondlistType dihedral_list
AngleBondlistType angle_list
std::vector< int > new_pair_list
PairBondIDType pair_ids
void reset()
Reset counts + collision vectors.
std::vector< int > new_angle_list
void clear()
Deallocates Views.
void add_new_bond(int bond_id, std::vector< int > const &particle_ids, Kokkos::View< int * > const &id_to_index)
std::vector< int > new_dihedral_ids
void set_counts(int p, int a, int d)
std::vector< int > new_pair_ids
DihedralBondIDType dihedral_ids
PairBondlistType pair_list