Changes in src/linkedcell.cpp [d74077:952f38]
- File:
-
- 1 edited
-
src/linkedcell.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/linkedcell.cpp
rd74077 r952f38 8 8 9 9 #include "atom.hpp" 10 #include " helpers.hpp"10 #include "Helpers/helpers.hpp" 11 11 #include "linkedcell.hpp" 12 #include " verbose.hpp"13 #include " log.hpp"12 #include "Helpers/Verbose.hpp" 13 #include "Helpers/Log.hpp" 14 14 #include "molecule.hpp" 15 15 #include "tesselation.hpp" 16 #include " vector.hpp"16 #include "LinearAlgebra/Vector.hpp" 17 17 18 18 // ========================================================= class LinkedCell =========================================== … … 56 56 Walker = set->GetPoint(); 57 57 for (int i=0;i<NDIM;i++) { 58 max[i] = Walker-> at(i);59 min[i] = Walker-> at(i);58 max[i] = Walker->node->at(i); 59 min[i] = Walker->node->at(i); 60 60 } 61 61 set->GoToFirst(); … … 63 63 Walker = set->GetPoint(); 64 64 for (int i=0;i<NDIM;i++) { 65 if (max[i] < Walker-> at(i))66 max[i] = Walker-> at(i);67 if (min[i] > Walker-> at(i))68 min[i] = Walker-> at(i);65 if (max[i] < Walker->node->at(i)) 66 max[i] = Walker->node->at(i); 67 if (min[i] > Walker->node->at(i)) 68 min[i] = Walker->node->at(i); 69 69 } 70 70 set->GoToNext(); … … 96 96 Walker = set->GetPoint(); 97 97 for (int i=0;i<NDIM;i++) { 98 n[i] = static_cast<int>(floor((Walker-> at(i) - min[i])/RADIUS));98 n[i] = static_cast<int>(floor((Walker->node->at(i) - min[i])/RADIUS)); 99 99 } 100 100 index = n[0] * N[1] * N[2] + n[1] * N[2] + n[2]; … … 130 130 LinkedNodes::iterator Runner = set->begin(); 131 131 for (int i=0;i<NDIM;i++) { 132 max[i] = (*Runner)-> at(i);133 min[i] = (*Runner)-> at(i);132 max[i] = (*Runner)->node->at(i); 133 min[i] = (*Runner)->node->at(i); 134 134 } 135 135 for (LinkedNodes::iterator Runner = set->begin(); Runner != set->end(); Runner++) { 136 136 Walker = *Runner; 137 137 for (int i=0;i<NDIM;i++) { 138 if (max[i] < Walker-> at(i))139 max[i] = Walker-> at(i);140 if (min[i] > Walker-> at(i))141 min[i] = Walker-> at(i);138 if (max[i] < Walker->node->at(i)) 139 max[i] = Walker->node->at(i); 140 if (min[i] > Walker->node->at(i)) 141 min[i] = Walker->node->at(i); 142 142 } 143 143 } … … 167 167 Walker = *Runner; 168 168 for (int i=0;i<NDIM;i++) { 169 n[i] = static_cast<int>(floor((Walker-> at(i) - min[i])/RADIUS));169 n[i] = static_cast<int>(floor((Walker->node->at(i) - min[i])/RADIUS)); 170 170 } 171 171 index = n[0] * N[1] * N[2] + n[1] * N[2] + n[2]; … … 248 248 * \return Vector is inside bounding box - true, else - false 249 249 */ 250 bool LinkedCell::SetIndexToVector(const Vector &x) const250 bool LinkedCell::SetIndexToVector(const Vector * const x) const 251 251 { 252 252 for (int i=0;i<NDIM;i++) 253 n[i] = (int)floor((x .at(i) - min[i])/RADIUS);253 n[i] = (int)floor((x->at(i) - min[i])/RADIUS); 254 254 255 255 return CheckBounds(); … … 264 264 bool status = false; 265 265 for (int i=0;i<NDIM;i++) { 266 n[i] = static_cast<int>(floor((Walker-> at(i) - min[i])/RADIUS));266 n[i] = static_cast<int>(floor((Walker->node->at(i) - min[i])/RADIUS)); 267 267 } 268 268 index = n[0] * N[1] * N[2] + n[1] * N[2] + n[2]; … … 404 404 Walker = *Runner; 405 405 //Log() << Verbose(1) << "Current neighbour is at " << *Walker->node << "." << endl; 406 if (( Walker->DistanceSquared(*center) - radiusSquared) < MYEPSILON) {406 if ((center->DistanceSquared(*Walker->node) - radiusSquared) < MYEPSILON) { 407 407 TesselList->push_back(Walker); 408 408 }
Note:
See TracChangeset
for help on using the changeset viewer.
