Ignore:
File:
1 edited

Legend:

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

    rbf3817 r952f38  
    55 *      Author: heber
    66 */
    7 
    8 // include config.h
    9 #ifdef HAVE_CONFIG_H
    10 #include <config.h>
    11 #endif
    127
    138#include "Helpers/MemDebug.hpp"
     
    6560  ASSERT(AllAtoms.size() > 0, "There must be atoms present for AddingEmptyBoundary.");
    6661  vector<atom *>::iterator AtomRunner = AllAtoms.begin();
    67   Min = (*AtomRunner)->getPosition();
    68   Max = (*AtomRunner)->getPosition();
     62  Min = (*AtomRunner)->x;
     63  Max = (*AtomRunner)->x;
    6964  for (; AtomRunner != AllAtoms.end(); ++AtomRunner) {
    7065    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];
    7570    }
    7671  }
     
    8984  AtomRunner = AllAtoms.begin();
    9085  for (; AtomRunner != AllAtoms.end(); ++AtomRunner)
    91     *(*AtomRunner) -= Min - boundary;
     86    (*AtomRunner)->x -= Min - boundary;
    9287  return Action::success;
    9388}
Note: See TracChangeset for help on using the changeset viewer.