- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
rbf3817 r952f38 5 5 * Author: heber 6 6 */ 7 8 // include config.h9 #ifdef HAVE_CONFIG_H10 #include <config.h>11 #endif12 7 13 8 #include "Helpers/MemDebug.hpp" … … 65 60 ASSERT(AllAtoms.size() > 0, "There must be atoms present for AddingEmptyBoundary."); 66 61 vector<atom *>::iterator AtomRunner = AllAtoms.begin(); 67 Min = (*AtomRunner)-> getPosition();68 Max = (*AtomRunner)-> getPosition();62 Min = (*AtomRunner)->x; 63 Max = (*AtomRunner)->x; 69 64 for (; AtomRunner != AllAtoms.end(); ++AtomRunner) { 70 65 for (int i=0;i<NDIM;i++) { 71 if ((*AtomRunner)-> at(i)> Max[i])72 Max[i] = (*AtomRunner)-> at(i);73 if ((*AtomRunner)-> at(i)< Min[i])74 Min[i] = (*AtomRunner)-> at(i);66 if ((*AtomRunner)->x[i] > Max[i]) 67 Max[i] = (*AtomRunner)->x[i]; 68 if ((*AtomRunner)->x[i] < Min[i]) 69 Min[i] = (*AtomRunner)->x[i]; 75 70 } 76 71 } … … 89 84 AtomRunner = AllAtoms.begin(); 90 85 for (; AtomRunner != AllAtoms.end(); ++AtomRunner) 91 *(*AtomRunner)-= Min - boundary;86 (*AtomRunner)->x -= Min - boundary; 92 87 return Action::success; 93 88 }
Note:
See TracChangeset
for help on using the changeset viewer.