Ignore:
Timestamp:
Nov 4, 2009, 7:56:04 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
4ef101, aa8542
Parents:
ec70ec
Message:

Huge change from ofstream * (const) out --> Log().

  • first shift was done via regular expressions
  • then via error messages from the code
  • note that class atom, class element and class molecule kept in parts their output stream, was they print to file.
  • make check runs fine
  • MISSING: Verbosity is not fixed for everything (i.e. if no endl; is present and next has Verbose(0) ...)

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/atom_trajectoryparticle.cpp

    rec70ec r543ce4  
    1010#include "config.hpp"
    1111#include "element.hpp"
     12#include "log.hpp"
    1213#include "parser.hpp"
    1314#include "verbose.hpp"
     
    7172{
    7273  if (Trajectory.R.size() <= (unsigned int)(MaxSteps)) {
    73     //cout << "Increasing size for trajectory array of " << keyword << " to " << (MaxSteps+1) << "." << endl;
     74    //Log() << Verbose(0) << "Increasing size for trajectory array of " << keyword << " to " << (MaxSteps+1) << "." << endl;
    7475    Trajectory.R.resize(MaxSteps+1);
    7576    Trajectory.U.resize(MaxSteps+1);
     
    120121//      out << ")\t(";
    121122//      for (int d=0;d<NDIM;d++)
    122 //        cout << Trajectory.U.at(NextStep).x[d] << " ";          // next step
     123//        Log() << Verbose(0) << Trajectory.U.at(NextStep).x[d] << " ";          // next step
    123124//      out << ")" << endl;
    124125};
     
    197198    // throw a dice to determine whether it gets hit by a heat bath particle
    198199    if (((((rand()/(double)RAND_MAX))*configuration->TempFrequency) < 1.)) {
    199       cout << Verbose(3) << "Particle " << *this << " was hit (sigma " << sigma << "): " << sqrt(U[0]*U[0]+U[1]*U[1]+U[2]*U[2]) << " -> ";
     200      Log() << Verbose(3) << "Particle " << *this << " was hit (sigma " << sigma << "): " << sqrt(U[0]*U[0]+U[1]*U[1]+U[2]*U[2]) << " -> ";
    200201      // pick three random numbers from a Boltzmann distribution around the desired temperature T for each momenta axis
    201202      for (int d=0; d<NDIM; d++) {
    202203        U[d] = gsl_ran_gaussian (r, sigma);
    203204      }
    204       cout << sqrt(U[0]*U[0]+U[1]*U[1]+U[2]*U[2]) << endl;
     205      Log() << Verbose(0) << sqrt(U[0]*U[0]+U[1]*U[1]+U[2]*U[2]) << endl;
    205206    }
    206207    for (int d=0; d<NDIM; d++)
Note: See TracChangeset for help on using the changeset viewer.