source: molecuilder/src/linkedcell.hpp@ 4aef8a

Last change on this file since 4aef8a was 95183e, checked in by Frederik Heber <heber@…>, 17 years ago

New file and class LinkedCell that contains the linked cell algorithms

Linked Cell class with

  • max,min vectors, list of cells, number of cells per axis
  • n is temporary indices to access a specific cell
  • functions to get pointer to cell specified by vector or by atom and checking bounds
  • Property mode set to 100644
File size: 822 bytes
Line 
1#ifndef LINKEDCELL_HPP_
2#define LINKEDCELL_HPP_
3
4// include config.h
5#ifdef HAVE_CONFIG_H
6#include <config.h>
7#endif
8
9#include "molecules.hpp"
10
11class LinkedCell{
12 public:
13 Vector max; // upper boundary
14 Vector min; // lower boundary
15 LinkedAtoms *LC; // linked cell list
16 double RADIUS; // cell edge length
17 int N[NDIM]; // number of cells per axis
18 int n[NDIM]; // temporary variable for current cell per axis
19 int index; // temporary index variable , access by index = n[0] * N[1] * N[2] + n[1] * N[2] + n[2];
20
21 LinkedCell();
22 LinkedCell(molecule *mol, double RADIUS);
23 ~LinkedCell();
24 LinkedAtoms* GetCurrentCell();
25 bool SetIndexToAtom(atom *Walker);
26 bool SetIndexToVector(Vector *x);
27 bool CheckBounds();
28};
29
30#endif /*LINKEDCELL_HPP_*/
Note: See TracBrowser for help on using the repository browser.