Changeset 97498a for src/unittests/tesselation_insideoutsideunittest.cpp
- Timestamp:
- Jan 8, 2010, 2:04:22 PM (15 years ago)
- 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:
- 9fb860
- Parents:
- c15ca2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/tesselation_insideoutsideunittest.cpp
rc15ca2 r97498a 26 26 void TesselationInOutsideTest::setUp() 27 27 { 28 setVerbosity( 3);28 setVerbosity(5); 29 29 30 30 // create corners … … 32 32 Walker = new TesselPoint; 33 33 Walker->node = new Vector(0., 0., 0.); 34 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");34 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 35 35 strcpy(Walker->Name, "1"); 36 36 Walker->nr = 1; … … 38 38 Walker = new TesselPoint; 39 39 Walker->node = new Vector(0., 1., 0.); 40 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");40 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 41 41 strcpy(Walker->Name, "2"); 42 42 Walker->nr = 2; … … 44 44 Walker = new TesselPoint; 45 45 Walker->node = new Vector(1., 0., 0.); 46 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");46 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 47 47 strcpy(Walker->Name, "3"); 48 48 Walker->nr = 3; … … 50 50 Walker = new TesselPoint; 51 51 Walker->node = new Vector(1., 1., 0.); 52 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");52 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 53 53 strcpy(Walker->Name, "4"); 54 54 Walker->nr = 4; … … 56 56 Walker = new TesselPoint; 57 57 Walker->node = new Vector(0., 0., 1.); 58 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");58 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 59 59 strcpy(Walker->Name, "5"); 60 60 Walker->nr = 5; … … 62 62 Walker = new TesselPoint; 63 63 Walker->node = new Vector(0., 1., 1.); 64 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");64 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 65 65 strcpy(Walker->Name, "6"); 66 66 Walker->nr = 6; … … 68 68 Walker = new TesselPoint; 69 69 Walker->node = new Vector(1., 0., 1.); 70 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");70 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 71 71 strcpy(Walker->Name, "7"); 72 72 Walker->nr = 7; … … 74 74 Walker = new TesselPoint; 75 75 Walker->node = new Vector(1., 1., 1.); 76 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp ");76 Walker->Name = Malloc<char>(3, "TesselationInOutsideTest::setUp - *Name"); 77 77 strcpy(Walker->Name, "8"); 78 78 Walker->nr = 8; … … 146 146 { 147 147 double n[3]; 148 const double boundary = 5.;148 const double boundary = 2.; 149 149 const double step = 1.; 150 150 … … 153 153 for (n[1] = -boundary; n[1] <= boundary; n[1]+=step) 154 154 for (n[2] = -boundary; n[2] <= boundary; n[2]+=step) { 155 if ( ((n[0] > 0) && (n[0] > 0) && (n[0] > 0)) && (n[0]+n[1]+n[2]<= 1.))155 if ( ((n[0] >= 0.) && (n[1] >= 0.) && (n[2] >= 0.)) && (fabs(n[0])+fabs(n[1])+fabs(n[2]) <= 1.)) 156 156 CPPUNIT_ASSERT_EQUAL( true , TesselStruct->IsInnerPoint(Vector(n[0], n[1], n[2]), LinkedList) ); 157 157 else
Note:
See TracChangeset
for help on using the changeset viewer.