Ignore:
Timestamp:
Apr 9, 2010, 9:55:39 AM (16 years ago)
Author:
heber <heber@…>
Children:
bd8561
Parents:
6250e5
Message:

LinkedNodes is now declared inside LinkedCell and some new functions.

  • as prepraratory measure we placed LinkedNodes as typedef into LinkedCell class. This caused same namespace changes elsewhere where LinkedNodes is used.
  • new function GetallNeighbours() which performs going through linked cells.
  • new function GetPointsInsideaSphere() which performs going through linked cells and returns all neighbours up to a given distance to a given center.

Note: New functions are not yet used elsewhere. Unit test has to be written beforehand.

Signed-off-by: heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/linkedcell.hpp

    r6250e5 r6dd8d3  
    3333/********************************************** definitions *********************************/
    3434
    35 #define LinkedNodes list<TesselPoint *>
    3635
    3736/********************************************** declarations *******************************/
     
    4039 */
    4140class LinkedCell {
    42   public:
     41private:
     42
     43public:
     44  typedef list<TesselPoint *> LinkedNodes;
     45
     46
    4347    Vector max;       // upper boundary
    4448    Vector min;       // lower boundary
     
    5357    LinkedCell(LinkedNodes *set, const double radius);
    5458    ~LinkedCell();
    55     const LinkedNodes* GetCurrentCell()const ;
    56     const LinkedNodes* GetRelativeToCurrentCell(const int relative[NDIM])const ;
     59    const LinkedCell::LinkedNodes* GetCurrentCell()const ;
     60    const LinkedCell::LinkedNodes* GetRelativeToCurrentCell(const int relative[NDIM])const ;
    5761    bool SetIndexToNode(const TesselPoint * const Walker)const ;
    5862    bool SetIndexToVector(const Vector * const x)const ;
     
    6064    bool CheckBounds(const int relative[NDIM])const ;
    6165    void GetNeighbourBounds(int lower[NDIM], int upper[NDIM])const ;
     66
     67    LinkedCell::LinkedNodes* GetallNeighbours(const double distance) const;
     68    LinkedCell::LinkedNodes* GetPointsInsideSphere(const double radius, const Vector * const center) const;
    6269
    6370    // not implemented yet
Note: See TracChangeset for help on using the changeset viewer.