Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom.cpp

    rc084cc r0ba410  
    1919
    2020#include <iomanip>
     21#include <iostream>
    2122
    2223/************************************* Functions for class atom *************************************/
     
    109110};
    110111
     112bool atom::isFather(const atom *ptr){
     113  return ptr==father;
     114}
     115
    111116/** Checks whether atom is within the given box.
    112117 * \param offset offset to box origin
     
    161166  * \return true - \a *out present, false - \a *out is NULL
    162167 */
    163 bool atom::OutputArrayIndexed(ostream * const out, const int *ElementNo, int *AtomNo, const char *comment) const
     168bool atom::OutputArrayIndexed(ostream * const out,const enumeration<const element*> &elementLookup, int *AtomNo, const char *comment) const
    164169{
    165170  AtomNo[type->Z]++;  // increment number
    166171  if (out != NULL) {
    167     *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t"  << fixed << setprecision(9) << showpoint;
     172    cout << "Looking for atom with element " << *type << endl;
     173    ASSERT(elementLookup.there.find(type)!=elementLookup.there.end(),"Type of this atom was not in the formula upon enumeration");
     174    *out << "Ion_Type" << elementLookup.there.find(type)->second << "_" << AtomNo[type->Z] << "\t"  << fixed << setprecision(9) << showpoint;
    168175    *out << x[0] << "\t" << x[1] << "\t" << x[2];
    169176    *out << "\t" << FixedIon;
Note: See TracChangeset for help on using the changeset viewer.