MDStressLab++
neighbor_list.h
Go to the documentation of this file.
1 /*
2  * neighbor_list.h
3  *
4  * Created on: Nov 6, 2019
5  * Author: Nikhil
6  */
7 
8 #ifndef NEIGHBOR_LIST_H_
9 #define NEIGHBOR_LIST_H_
10 
11 #include <vector>
12 #include "typedef.h"
13 
14 typedef struct
15 {
17  double cutoff;
18  int* Nneighbors;
20  int* beginIndex;
21 } NeighListOne;
22 
23 // neighbor list structure
24 typedef struct
25 {
28 } NeighList;
29 
30 
31 void nbl_initialize(NeighList ** const nl);
32 
33 int nbl_create_paddings(const int numberOfParticles,
34  const double cutoff,
35  double const * reference_cell,
36  double const * cell,
37  int const * PBC,
38  double const * reference_coordinates,
39  double const * coordinates,
40  const std::vector<std::string>& speciesCode,
41  int & numberOfPaddings,
42  std::vector<double> & reference_coordinatesOfPaddings,
43  std::vector<double> & coordinatesOfPaddings,
44  std::vector<std::string> & speciesCodeOfPaddings,
45  std::vector<int> & masterOfPaddings,
46  int referenceAndFinal);
47 
48 int nbl_build(NeighList * const nl,
49  int const numberOfParticles,
50  double const * coordinates,
51  double const influenceDistance,
52  int const numberOfCutoffs,
53  double const * cutoffs,
54  int const * needNeighbors);
55 
56 int nbl_get_neigh(void const * const nl,
57  int const numberOfCutoffs,
58  double const * const cutoffs,
59  int const neighborListIndex,
60  int const particleNumber,
61  int * const numberOfNeighbors,
62  int const ** const neighborsOfParticle);
63 
64 void nbl_clean(NeighList ** const nl);
65 
66 
67 
68 #endif /* NEIGHBOR_LIST_H_ */
int nbl_create_paddings(const int numberOfParticles, const double cutoff, double const *reference_cell, double const *cell, int const *PBC, double const *reference_coordinates, double const *coordinates, const std::vector< std::string > &speciesCode, int &numberOfPaddings, std::vector< double > &reference_coordinatesOfPaddings, std::vector< double > &coordinatesOfPaddings, std::vector< std::string > &speciesCodeOfPaddings, std::vector< int > &masterOfPaddings, int referenceAndFinal)
int numberOfNeighborLists
Definition: neighbor_list.h:26
int numberOfParticles
Definition: neighbor_list.h:16
int nbl_get_neigh(void const *const nl, int const numberOfCutoffs, double const *const cutoffs, int const neighborListIndex, int const particleNumber, int *const numberOfNeighbors, int const **const neighborsOfParticle)
NeighListOne * lists
Definition: neighbor_list.h:27
int nbl_build(NeighList *const nl, int const numberOfParticles, double const *coordinates, double const influenceDistance, int const numberOfCutoffs, double const *cutoffs, int const *needNeighbors)
int * beginIndex
Definition: neighbor_list.h:20
void nbl_initialize(NeighList **const nl)
int * neighborList
Definition: neighbor_list.h:19
void nbl_clean(NeighList **const nl)
int * Nneighbors
Definition: neighbor_list.h:18