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/analysis_correlation.cpp

    r90c4460 r0d111b  
    5757                if (Walker->nr < OtherWalker->nr)
    5858                  if ((type2 == NULL) || (OtherWalker->type == type2)) {
    59                     distance = Walker->node->PeriodicDistance(OtherWalker->node, World::getInstance().getDomain());
     59                    distance = Walker->node->PeriodicDistance(*OtherWalker->node, World::getInstance().getDomain());
    6060                    //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl;
    6161                    outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) );
     
    106106        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl);
    107107        if ((type1 == NULL) || (Walker->type == type1)) {
    108           periodicX.CopyVector(Walker->node);
     108          periodicX = *(Walker->node);
    109109          periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
    110110          // go through every range in xyz and get distance
     
    112112            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
    113113              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
    114                 checkX.Init(n[0], n[1], n[2]);
    115                 checkX.AddVector(&periodicX);
     114                checkX = Vector(n[0], n[1], n[2]) + periodicX;
    116115                checkX.MatrixMultiplication(FullMatrix);
    117116                for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++)
     
    124123                      if (Walker->nr < OtherWalker->nr)
    125124                        if ((type2 == NULL) || (OtherWalker->type == type2)) {
    126                           periodicOtherX.CopyVector(OtherWalker->node);
     125                          periodicOtherX = *(OtherWalker->node);
    127126                          periodicOtherX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
    128127                          // go through every range in xyz and get distance
     
    130129                            for (Othern[1]=-ranges[1]; Othern[1] <= ranges[1]; Othern[1]++)
    131130                              for (Othern[2]=-ranges[2]; Othern[2] <= ranges[2]; Othern[2]++) {
    132                                 checkOtherX.Init(Othern[0], Othern[1], Othern[2]);
    133                                 checkOtherX.AddVector(&periodicOtherX);
     131                                checkOtherX = Vector(Othern[0], Othern[1], Othern[2]) + periodicOtherX;
    134132                                checkOtherX.MatrixMultiplication(FullMatrix);
    135                                 distance = checkX.Distance(&checkOtherX);
     133                                distance = checkX.Distance(checkOtherX);
    136134                                //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl;
    137135                                outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) );
     
    176174        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl);
    177175        if ((type == NULL) || (Walker->type == type)) {
    178           distance = Walker->node->PeriodicDistance(point, World::getInstance().getDomain());
     176          distance = Walker->node->PeriodicDistance(*point, World::getInstance().getDomain());
    179177          DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
    180178          outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) );
     
    218216        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl);
    219217        if ((type == NULL) || (Walker->type == type)) {
    220           periodicX.CopyVector(Walker->node);
     218          periodicX = *(Walker->node);
    221219          periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
    222220          // go through every range in xyz and get distance
     
    224222            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
    225223              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
    226                 checkX.Init(n[0], n[1], n[2]);
    227                 checkX.AddVector(&periodicX);
     224                checkX = Vector(n[0], n[1], n[2]) + periodicX;
    228225                checkX.MatrixMultiplication(FullMatrix);
    229                 distance = checkX.Distance(point);
     226                distance = checkX.Distance(*point);
    230227                DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
    231228                outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) );
     
    322319        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl);
    323320        if ((type == NULL) || (Walker->type == type)) {
    324           periodicX.CopyVector(Walker->node);
     321          periodicX = *(Walker->node);
    325322          periodicX.MatrixMultiplication(FullInverseMatrix);  // x now in [0,1)^3
    326323          // go through every range in xyz and get distance
     
    329326            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
    330327              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
    331                 checkX.Init(n[0], n[1], n[2]);
    332                 checkX.AddVector(&periodicX);
     328                checkX = Vector(n[0], n[1], n[2]) + periodicX;
    333329                checkX.MatrixMultiplication(FullMatrix);
    334330                TriangleIntersectionList Intersections(&checkX,Surface,LC);
     
    402398    *file << runner->first;
    403399    for (int i=0;i<NDIM;i++)
    404       *file << "\t" << setprecision(8) << (runner->second.first->node->x[i] - runner->second.second->x[i]);
     400      *file << "\t" << setprecision(8) << (runner->second.first->node->at(i) - runner->second.second->at(i));
    405401    *file << endl;
    406402  }
Note: See TracChangeset for help on using the changeset viewer.