Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/Actions/WorldAction/AddEmptyBoundaryAction.cpp

    r952f38 rbf3817  
    55 *      Author: heber
    66 */
     7
     8// include config.h
     9#ifdef HAVE_CONFIG_H
     10#include <config.h>
     11#endif
    712
    813#include "Helpers/MemDebug.hpp"
     
    6065  ASSERT(AllAtoms.size() > 0, "There must be atoms present for AddingEmptyBoundary.");
    6166  vector<atom *>::iterator AtomRunner = AllAtoms.begin();
    62   Min = (*AtomRunner)->x;
    63   Max = (*AtomRunner)->x;
     67  Min = (*AtomRunner)->getPosition();
     68  Max = (*AtomRunner)->getPosition();
    6469  for (; AtomRunner != AllAtoms.end(); ++AtomRunner) {
    6570    for (int i=0;i<NDIM;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];
     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);
    7075    }
    7176  }
     
    8489  AtomRunner = AllAtoms.begin();
    8590  for (; AtomRunner != AllAtoms.end(); ++AtomRunner)
    86     (*AtomRunner)->x -= Min - boundary;
     91    *(*AtomRunner) -= Min - boundary;
    8792  return Action::success;
    8893}
Note: See TracChangeset for help on using the changeset viewer.