Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TremoloParser.cpp

    re97a44 rd74077  
    99
    1010#include "Helpers/Assert.hpp"
    11 #include "Helpers/Log.hpp"
    12 #include "Helpers/Verbose.hpp"
    1311#include "TremoloParser.hpp"
    1412#include "World.hpp"
     
    2321
    2422using namespace std;
     23using namespace boost;
    2524
    2625/**
     
    10099 */
    101100void TremoloParser::save(ostream* file) {
    102   DoLog(0) && (Log() << Verbose(0) << "Saving changes to tremolo." << std::endl);
    103 
    104101  vector<atom*>::iterator atomIt;
    105102  vector<string>::iterator it;
     
    143140      case TremoloKey::x :
    144141        // for the moment, assume there are always three dimensions
    145         *file << currentAtom->x[0] << "\t";
    146         *file << currentAtom->x[1] << "\t";
    147         *file << currentAtom->x[2] << "\t";
     142        *file << currentAtom->at(0) << "\t";
     143        *file << currentAtom->at(1) << "\t";
     144        *file << currentAtom->at(2) << "\t";
    148145        break;
    149146      case TremoloKey::u :
    150147        // for the moment, assume there are always three dimensions
    151         *file << currentAtom->v[0] << "\t";
    152         *file << currentAtom->v[1] << "\t";
    153         *file << currentAtom->v[2] << "\t";
     148        *file << currentAtom->AtomicVelocity[0] << "\t";
     149        *file << currentAtom->AtomicVelocity[1] << "\t";
     150        *file << currentAtom->AtomicVelocity[2] << "\t";
    154151        break;
    155152      case TremoloKey::Type :
     
    228225  string word;
    229226  int oldId;
     227  double tmp;
    230228
    231229  lineStream << line;
     
    235233      case TremoloKey::x :
    236234        // for the moment, assume there are always three dimensions
    237         lineStream >> newAtom->x[0];
    238         lineStream >> newAtom->x[1];
    239         lineStream >> newAtom->x[2];
     235        for (int i=0;i<NDIM;i++) {
     236          lineStream >> tmp;
     237          newAtom->set(i, tmp);
     238        }
    240239        break;
    241240      case TremoloKey::u :
    242241        // for the moment, assume there are always three dimensions
    243         lineStream >> newAtom->v[0];
    244         lineStream >> newAtom->v[1];
    245         lineStream >> newAtom->v[2];
     242        lineStream >> newAtom->AtomicVelocity[0];
     243        lineStream >> newAtom->AtomicVelocity[1];
     244        lineStream >> newAtom->AtomicVelocity[2];
    246245        break;
    247246      case TremoloKey::Type :
Note: See TracChangeset for help on using the changeset viewer.