Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/WorldAction/CenterOnEdgeAction.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"
     
    5560  ASSERT(AllAtoms.size() > 0, "For CenteronEdge atoms must be present.");
    5661  vector<atom *>::iterator AtomRunner = AllAtoms.begin();
    57   Min = (*AtomRunner)->x;
    58   Max = (*AtomRunner)->x;
     62  Min = (*AtomRunner)->getPosition();
     63  Max = (*AtomRunner)->getPosition();
    5964  for (; AtomRunner != AllAtoms.end(); ++AtomRunner) {
    6065    for (int i=0;i<NDIM;i++) {
    61       if ((*AtomRunner)->x[i] > Max[i])
    62         Max[i] = (*AtomRunner)->x[i];
    63       if ((*AtomRunner)->x[i] < Min[i])
    64         Min[i] = (*AtomRunner)->x[i];
     66      if ((*AtomRunner)->at(i) > Max[i])
     67        Max[i] = (*AtomRunner)->at(i);
     68      if ((*AtomRunner)->at(i) < Min[i])
     69        Min[i] = (*AtomRunner)->at(i);
    6570    }
    6671  }
     
    7580  // translate all atoms, such that Min is aty (0,0,0)
    7681  for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner)
    77     (*AtomRunner)->x -= Min;
     82    *(*AtomRunner) -= Min;
    7883
    7984  return Action::success;
Note: See TracChangeset for help on using the changeset viewer.