Ignore:
Timestamp:
Apr 29, 2010, 1:55:21 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
070651, 5d1a94
Parents:
90c4460 (diff), 32842d8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'VectorRefactoring' into StructureRefactoring

Conflicts:

molecuilder/src/Legacy/oldmenu.cpp
molecuilder/src/Makefile.am
molecuilder/src/analysis_correlation.cpp
molecuilder/src/boundary.cpp
molecuilder/src/builder.cpp
molecuilder/src/config.cpp
molecuilder/src/ellipsoid.cpp
molecuilder/src/linkedcell.cpp
molecuilder/src/molecule.cpp
molecuilder/src/molecule_fragmentation.cpp
molecuilder/src/molecule_geometry.cpp
molecuilder/src/molecule_graph.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/tesselation.cpp
molecuilder/src/tesselationhelpers.cpp
molecuilder/src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
molecuilder/src/unittests/bondgraphunittest.cpp
molecuilder/src/vector.cpp
molecuilder/src/vector.hpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/atom.cpp

    r90c4460 r0d111b  
    3333{
    3434  type = pointer->type;  // copy element of atom
    35   x.CopyVector(&pointer->x); // copy coordination
    36   v.CopyVector(&pointer->v); // copy velocity
     35  x = pointer->x; // copy coordination
     36  v = pointer->v; // copy velocity
    3737  FixedIon = pointer->FixedIon;
    3838  node = &x;
     
    4646  res->sort = &res->nr;
    4747  res->type = type;
    48   res->x.CopyVector(&this->x);
    49   res->v.CopyVector(&this->v);
     48  res->x = this->x;
     49  res->v = this->v;
    5050  res->FixedIon = FixedIon;
    5151  res->node = &x;
     
    130130  if (out != NULL) {
    131131    *out << "Ion_Type" << ElementNo << "_" << AtomNo << "\t"  << fixed << setprecision(9) << showpoint;
    132     *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2];
     132    *out << x[0] << "\t" << x[1] << "\t" << x[2];
    133133    *out << "\t" << FixedIon;
    134134    if (v.Norm() > MYEPSILON)
    135       *out << "\t" << scientific << setprecision(6) << v.x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t";
     135      *out << "\t" << scientific << setprecision(6) << v[0] << "\t" << v[1] << "\t" << v[2] << "\t";
    136136    if (comment != NULL)
    137137      *out << " # " << comment << endl;
     
    155155  if (out != NULL) {
    156156    *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t"  << fixed << setprecision(9) << showpoint;
    157     *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2];
     157    *out << x[0] << "\t" << x[1] << "\t" << x[2];
    158158    *out << "\t" << FixedIon;
    159159    if (v.Norm() > MYEPSILON)
    160       *out << "\t" << scientific << setprecision(6) << v.x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t";
     160      *out << "\t" << scientific << setprecision(6) << v[0] << "\t" << v[1] << "\t" << v[2] << "\t";
    161161    if (comment != NULL)
    162162      *out << " # " << comment << endl;
     
    175175{
    176176  if (out != NULL) {
    177     *out << type->symbol << "\t" << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2] << "\t" << endl;
     177    *out << type->symbol << "\t" << x[0] << "\t" << x[1] << "\t" << x[2] << "\t" << endl;
    178178    return true;
    179179  } else
     
    193193  if (out != NULL) {
    194194    *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t"  << fixed << setprecision(9) << showpoint;
    195     *out << Trajectory.R.at(step).x[0] << "\t" << Trajectory.R.at(step).x[1] << "\t" << Trajectory.R.at(step).x[2];
     195    *out << Trajectory.R.at(step)[0] << "\t" << Trajectory.R.at(step)[1] << "\t" << Trajectory.R.at(step)[2];
    196196    *out << "\t" << FixedIon;
    197197    if (Trajectory.U.at(step).Norm() > MYEPSILON)
    198       *out << "\t" << scientific << setprecision(6) << Trajectory.U.at(step).x[0] << "\t" << Trajectory.U.at(step).x[1] << "\t" << Trajectory.U.at(step).x[2] << "\t";
     198      *out << "\t" << scientific << setprecision(6) << Trajectory.U.at(step)[0] << "\t" << Trajectory.U.at(step)[1] << "\t" << Trajectory.U.at(step)[2] << "\t";
    199199    if (Trajectory.F.at(step).Norm() > MYEPSILON)
    200       *out << "\t" << scientific << setprecision(6) << Trajectory.F.at(step).x[0] << "\t" << Trajectory.F.at(step).x[1] << "\t" << Trajectory.F.at(step).x[2] << "\t";
     200      *out << "\t" << scientific << setprecision(6) << Trajectory.F.at(step)[0] << "\t" << Trajectory.F.at(step)[1] << "\t" << Trajectory.F.at(step)[2] << "\t";
    201201    *out << "\t# Number in molecule " << nr << endl;
    202202    return true;
     
    214214  if (out != NULL) {
    215215    *out << type->symbol << "\t";
    216     *out << Trajectory.R.at(step).x[0] << "\t";
    217     *out << Trajectory.R.at(step).x[1] << "\t";
    218     *out << Trajectory.R.at(step).x[2] << endl;
     216    *out << Trajectory.R.at(step)[0] << "\t";
     217    *out << Trajectory.R.at(step)[1] << "\t";
     218    *out << Trajectory.R.at(step)[2] << endl;
    219219    return true;
    220220  } else
     
    229229void atom::OutputMPQCLine(ofstream * const out, const Vector *center, int *AtomNo = NULL) const
    230230{
    231   *out << "\t\t" << type->symbol << " [ " << x.x[0]-center->x[0] << "\t" << x.x[1]-center->x[1] << "\t" << x.x[2]-center->x[2] << " ]" << endl;
     231  *out << "\t\t" << type->symbol << " [ " << x[0]-center->at(0) << "\t" << x[1]-center->at(1) << "\t" << x[2]-center->at(2) << " ]" << endl;
    232232  if (AtomNo != NULL)
    233233    *AtomNo++;
     
    252252double atom::DistanceSquaredToVector(const Vector &origin) const
    253253{
    254   return origin.DistanceSquared(&x);
     254  return origin.DistanceSquared(x);
    255255};
    256256
     
    261261double atom::DistanceToVector(const Vector &origin) const
    262262{
    263   return origin.Distance(&x);
     263  return origin.Distance(x);
    264264};
    265265
Note: See TracChangeset for help on using the changeset viewer.