Ignore:
Timestamp:
Apr 29, 2010, 1:55:21 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
d79639
Parents:
632bc3 (diff), 753f02 (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
  • src/unittests/LinkedCellUnitTest.cpp

    r632bc3 r8cbb97  
    6161        Walker = World::getInstance().createAtom();
    6262        Walker->type = hydrogen;
    63         Walker->node->Init(x, y, z );
     63        *Walker->node = Vector(x, y, z );
    6464        TestMolecule->AddAtom(Walker);
    6565      }
     
    207207  Walker->Name = Malloc<char>(6, "LinkedCellTest::SetIndexToNodeTest - Walker");
    208208  strcpy(Walker->Name, "test");
    209   Walker->x.Init(1,1,1);
     209  Walker->x= Vector(1,1,1);
    210210  CPPUNIT_ASSERT_EQUAL( false, LC->SetIndexToNode(Walker) );
    211211  World::getInstance().destroyAtom(Walker);
     
    215215  Walker->Name = Malloc<char>(6, "LinkedCellTest::SetIndexToNodeTest - Walker");
    216216  strcpy(Walker->Name, "test");
    217   Walker->x.Init(0,-1,0);
     217  Walker->x = Vector(0,-1,0);
    218218  CPPUNIT_ASSERT_EQUAL( false, LC->SetIndexToNode(Walker) );
    219219  World::getInstance().destroyAtom(Walker);
     
    231231    for (double y=0.5;y<3;y+=1.)
    232232      for (double z=0.5;z<3;z+=1.) {
    233         tester.Init(x,y,z);
     233        tester = Vector(x,y,z);
    234234        CPPUNIT_ASSERT_EQUAL( true, LC->SetIndexToVector(&tester) );
    235235      }
     
    238238    for (double y=1.;y<4;y+=1.)
    239239      for (double z=1.;z<4;z+=1.) {
    240         tester.Init(x,y,z);
     240        tester= Vector(x,y,z);
    241241        cout << "Tester is at " << tester << "." << endl;
    242242        CPPUNIT_ASSERT_EQUAL( true, LC->SetIndexToVector(&tester) );
     
    246246    for (double y=0.5-1e-10;y<5;y+=3.1)
    247247      for (double z=0.5-1e-10;z<5;z+=3.1) {
    248         tester.Init(x,y,z);
     248        tester = Vector(x,y,z);
    249249        cout << "The following test is supposed to fail and produce an ERROR." << endl;
    250250        CPPUNIT_ASSERT_EQUAL( false, LC->SetIndexToVector(&tester) );
    251251      }
    252252  // check nonsense vectors
    253   tester.Init(-423598,3245978,29349);
     253  tester= Vector(-423598,3245978,29349);
    254254  cout << "The following test is supposed to fail and produce an ERROR." << endl;
    255255  CPPUNIT_ASSERT_EQUAL( false, LC->SetIndexToVector(&tester) );
     
    264264  int lower[NDIM], upper[NDIM];
    265265
    266   tester.Init(0.5,0.5,0.5);
     266  tester= Vector(0.5,0.5,0.5);
    267267  LC->SetIndexToVector(&tester);
    268268  LC->GetNeighbourBounds(lower, upper);
     
    284284
    285285  // get all atoms
    286   tester.Init(1.5,1.5,1.5);
     286  tester= Vector(1.5,1.5,1.5);
    287287  CPPUNIT_ASSERT_EQUAL ( true, LC->SetIndexToVector(&tester) );
    288288  ListOfPoints = LC->GetallNeighbours();
     
    303303
    304304  // get all atoms in one corner
    305   tester.Init(0.5, 0.5, 0.5);
     305  tester= Vector(0.5, 0.5, 0.5);
    306306  CPPUNIT_ASSERT_EQUAL ( true, LC->SetIndexToVector(&tester) );
    307307  ListOfPoints = LC->GetallNeighbours();
     
    311311  while (Walker->next != TestMolecule->end) {
    312312    Walker = Walker->next;
    313     if ((Walker->x.x[0] <2) && (Walker->x.x[1] <2) && (Walker->x.x[2] <2)) {
     313    if ((Walker->x[0] <2) && (Walker->x[1] <2) && (Walker->x[2] <2)) {
    314314      ListOfPoints->remove(Walker);
    315315      size--;
     
    323323
    324324  // get all atoms from one corner
    325   tester.Init(0.5, 0.5, 0.5);
     325  tester = Vector(0.5, 0.5, 0.5);
    326326  CPPUNIT_ASSERT_EQUAL ( true, LC->SetIndexToVector(&tester) );
    327327  ListOfPoints = LC->GetallNeighbours(3);
     
    352352
    353353  // get all points around central arom with radius 1.
    354   tester.Init(1.5,1.5,1.5);
     354  tester= Vector(1.5,1.5,1.5);
    355355  CPPUNIT_ASSERT_EQUAL ( true, LC->SetIndexToVector(&tester) );
    356356  ListOfPoints = LC->GetPointsInsideSphere(1., &tester);
     
    360360  while (Walker->next != TestMolecule->end) {
    361361    Walker = Walker->next;
    362     if ((Walker->x.DistanceSquared(&tester) - 1.) < MYEPSILON ) {
     362    if ((Walker->x.DistanceSquared(tester) - 1.) < MYEPSILON ) {
    363363      ListOfPoints->remove(Walker);
    364364      size--;
Note: See TracChangeset for help on using the changeset viewer.