Changeset 734816
- Timestamp:
- Apr 9, 2010, 9:55:39 AM (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:
- dcea0f
- Parents:
- fe238c
- Location:
- src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
-
Property mode
changed from
100755
to100644
rfe238c r734816 986 986 // 2. expand from there 987 987 while ((!TesselStruct->OpenLines.empty()) && (OneLoopWithoutSuccessFlag)) { 988 // 2a. fill all newOpenLines988 // 2a. print OpenLines 989 989 Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for candidates:" << endl; 990 990 for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) 991 Log() << Verbose(2) << *(Runner->second) << endl; 992 991 Log() << Verbose(1) << " " << *(Runner->second) << endl; 992 993 // 2b. find best candidate for each OpenLine 993 994 for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) { 994 995 baseline = Runner->second; … … 1000 1001 } 1001 1002 1002 // 2b. search for smallest ShortestAngle among all candidates 1003 double ShortestAngle = 4.*M_PI; 1003 // 2c. print OpenLines with candidates again 1004 1004 Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:" << endl; 1005 1005 for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) 1006 Log() << Verbose(2) << *(Runner->second) << endl; 1007 1006 Log() << Verbose(1) << " " << *(Runner->second) << endl; 1007 1008 // 2d. search for smallest ShortestAngle among all candidates 1009 double ShortestAngle = 4.*M_PI; 1008 1010 for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) { 1009 1011 if (Runner->second->ShortestAngle < ShortestAngle) { … … 1013 1015 } 1014 1016 } 1017 // 2e. if we found one, add candidate 1015 1018 if ((ShortestAngle == 4.*M_PI) || (baseline->pointlist.empty())) 1016 1019 OneLoopWithoutSuccessFlag = false; … … 1019 1022 } 1020 1023 1021 // write temporary envelope1024 // 2f. write temporary envelope 1022 1025 if (filename != NULL) { 1023 1026 if ((DoSingleStepOutput && ((TesselStruct->TrianglesOnBoundary.size() % SingleStepWidth == 0)))) { // if we have a new triangle and want to output each new triangle configuration -
Property mode
changed from
-
src/ellipsoid.cpp
rfe238c r734816 249 249 Log() << Verbose(2) << "INFO: Center cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " ... "; 250 250 // get random cell 251 const Linked Nodes *List = LC->GetCurrentCell();251 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 252 252 if (List == NULL) { // set index to it 253 253 continue; … … 268 268 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) 269 269 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 270 const Linked Nodes *List = LC->GetCurrentCell();270 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 271 271 PointsLeft += List->size(); 272 272 } … … 293 293 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) 294 294 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 295 const Linked Nodes *List = LC->GetCurrentCell();295 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 296 296 // Log() << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl; 297 297 if (List != NULL) { … … 300 300 // else 301 301 // Log() << Verbose(2) << "Cell is empty ... " << endl; 302 for (Linked Nodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {302 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 303 303 if ((current != PickedAtomNrs.end()) && (*current == index)) { 304 304 Candidate = (*Runner); -
src/linkedcell.cpp
rfe238c r734816 220 220 * \return LinkedAtoms pointer to current cell, NULL if LinkedCell::n[] are out of bounds. 221 221 */ 222 const Linked Nodes* LinkedCell::GetCurrentCell() const222 const LinkedCell::LinkedNodes* LinkedCell::GetCurrentCell() const 223 223 { 224 224 if (CheckBounds()) { … … 234 234 * \return LinkedAtoms pointer to current cell, NULL if LinkedCell::n[]+relative[] are out of bounds. 235 235 */ 236 const Linked Nodes* LinkedCell::GetRelativeToCurrentCell(const int relative[NDIM]) const236 const LinkedCell::LinkedNodes* LinkedCell::GetRelativeToCurrentCell(const int relative[NDIM]) const 237 237 { 238 238 if (CheckBounds(relative)) { … … 302 302 }; 303 303 304 /** Returns a list with all neighbours from the current LinkedCell::index. 305 * \param distance (if no distance, then adjacent cells are taken) 306 * \return list of tesselpoints 307 */ 308 LinkedCell::LinkedNodes* LinkedCell::GetallNeighbours(const double distance = 0) const 309 { 310 int N[NDIM], Nlower[NDIM], Nupper[NDIM]; 311 TesselPoint *Walker = NULL; 312 LinkedNodes *TesselList = new LinkedNodes; 313 314 // then go through the current and all neighbouring cells and check the contained points for possible candidates 315 //Log() << Verbose(1) << "LC Intervals:"; 316 const int step = (distance == 0) ? 1 : (int)floor(distance/RADIUS)+1; 317 for (int i=0;i<NDIM;i++) { 318 Nlower[i] = ((N[i]-step) >= 0) ? N[i]-step : 0; 319 Nupper[i] = ((N[i]+step) < N[i]) ? N[i]+step : N[i]-step; 320 //Log() << Verbose(0) << " [" << Nlower[i] << "," << Nupper[i] << "] "; 321 } 322 //Log() << Verbose(0) << endl; 323 for (n[0] = Nlower[0]; n[0] <= Nupper[0]; n[0]++) 324 for (n[1] = Nlower[1]; n[1] <= Nupper[1]; n[1]++) 325 for (n[2] = Nlower[2]; n[2] <= Nupper[2]; n[2]++) { 326 const LinkedNodes *List = GetCurrentCell(); 327 //Log() << Verbose(1) << "Current cell is " << n[0] << ", " << n[1] << ", " << n[2] << " with No. " << index << "." << endl; 328 if (List != NULL) { 329 for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 330 Walker = *Runner; 331 TesselList->push_back(Walker); 332 } 333 } 334 } 335 return TesselList; 336 }; 337 338 339 /** Returns a list of all TesselPoint with distance less than \a radius to \a *Center. 340 * \param radius radius of sphere 341 * \param *center center of sphere 342 * \return list of all points inside sphere 343 */ 344 LinkedCell::LinkedNodes* LinkedCell::GetPointsInsideSphere(const double radius, const Vector * const center) const 345 { 346 int N[NDIM], Nlower[NDIM], Nupper[NDIM]; 347 const double radiusSquared = radius*radius; 348 TesselPoint *Walker = NULL; 349 LinkedNodes *TesselList = new LinkedNodes; 350 351 if (SetIndexToVector(center)) { 352 for(int i=0;i<NDIM;i++) // store indices of this cell 353 N[i] = n[i]; 354 //Log() << Verbose(1) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << index << "." << endl; 355 } else { 356 DoeLog(1) && (eLog()<< Verbose(1) << "Vector " << *center << " is outside of LinkedCell's bounding box." << endl); 357 return TesselList; 358 } 359 // then go through the current and all neighbouring cells and check the contained points for possible candidates 360 //Log() << Verbose(1) << "LC Intervals:"; 361 for (int i=0;i<NDIM;i++) { 362 Nlower[i] = ((N[i]-1) >= 0) ? N[i]-1 : 0; 363 Nupper[i] = ((N[i]+1) < N[i]) ? N[i]+1 : N[i]-1; 364 //Log() << Verbose(0) << " [" << Nlower[i] << "," << Nupper[i] << "] "; 365 } 366 //Log() << Verbose(0) << endl; 367 for (n[0] = Nlower[0]; n[0] <= Nupper[0]; n[0]++) 368 for (n[1] = Nlower[1]; n[1] <= Nupper[1]; n[1]++) 369 for (n[2] = Nlower[2]; n[2] <= Nupper[2]; n[2]++) { 370 const LinkedNodes *List = GetCurrentCell(); 371 //Log() << Verbose(1) << "Current cell is " << n[0] << ", " << n[1] << ", " << n[2] << " with No. " << index << "." << endl; 372 if (List != NULL) { 373 for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 374 Walker = *Runner; 375 if ((center->DistanceSquared(Walker->node) - radiusSquared) > MYEPSILON) { 376 TesselList->push_back(Walker); 377 } 378 } 379 } 380 } 381 return TesselList; 382 }; -
src/linkedcell.hpp
rfe238c r734816 33 33 /********************************************** definitions *********************************/ 34 34 35 #define LinkedNodes list<TesselPoint *>36 35 37 36 /********************************************** declarations *******************************/ … … 40 39 */ 41 40 class LinkedCell { 42 public: 41 private: 42 43 public: 44 typedef list<TesselPoint *> LinkedNodes; 45 46 43 47 Vector max; // upper boundary 44 48 Vector min; // lower boundary … … 53 57 LinkedCell(LinkedNodes *set, const double radius); 54 58 ~LinkedCell(); 55 const Linked Nodes* GetCurrentCell()const ;56 const Linked Nodes* GetRelativeToCurrentCell(const int relative[NDIM])const ;59 const LinkedCell::LinkedNodes* GetCurrentCell()const ; 60 const LinkedCell::LinkedNodes* GetRelativeToCurrentCell(const int relative[NDIM])const ; 57 61 bool SetIndexToNode(const TesselPoint * const Walker)const ; 58 62 bool SetIndexToVector(const Vector * const x)const ; … … 60 64 bool CheckBounds(const int relative[NDIM])const ; 61 65 void GetNeighbourBounds(int lower[NDIM], int upper[NDIM])const ; 66 67 LinkedCell::LinkedNodes* GetallNeighbours(const double distance) const; 68 LinkedCell::LinkedNodes* GetPointsInsideSphere(const double radius, const Vector * const center) const; 62 69 63 70 // not implemented yet -
src/molecule_graph.cpp
rfe238c r734816 148 148 for (LC->n[1] = 0; LC->n[1] < LC->N[1]; LC->n[1]++) 149 149 for (LC->n[2] = 0; LC->n[2] < LC->N[2]; LC->n[2]++) { 150 const Linked Nodes *List = LC->GetCurrentCell();150 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 151 151 //Log() << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl; 152 152 if (List != NULL) { 153 for (Linked Nodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {153 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 154 154 Walker = AtomMap[(*Runner)->nr]; 155 155 //Log() << Verbose(0) << "Current Atom is " << *Walker << "." << endl; … … 158 158 for (n[1] = -1; n[1] <= 1; n[1]++) 159 159 for (n[2] = -1; n[2] <= 1; n[2]++) { 160 const Linked Nodes *OtherList = LC->GetRelativeToCurrentCell(n);160 const LinkedCell::LinkedNodes *OtherList = LC->GetRelativeToCurrentCell(n); 161 161 //Log() << Verbose(2) << "Current relative cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl; 162 162 if (OtherList != NULL) { 163 for (Linked Nodes::const_iterator OtherRunner = OtherList->begin(); OtherRunner != OtherList->end(); OtherRunner++) {163 for (LinkedCell::LinkedNodes::const_iterator OtherRunner = OtherList->begin(); OtherRunner != OtherList->end(); OtherRunner++) { 164 164 if ((*OtherRunner)->nr > Walker->nr) { 165 165 OtherWalker = AtomMap[(*OtherRunner)->nr]; -
src/tesselation.cpp
rfe238c r734816 1019 1019 BaseLine = NULL; 1020 1020 }; 1021 1022 /** Checks validity of a given sphere of a candidate line. 1023 * Sphere must touch all candidates and the baseline endpoints and there must be no other atoms inside. 1024 * \param RADIUS radius of sphere 1025 * \param *LC LinkedCell structure with other atoms 1026 * \return true - sphere is valid, false - sphere contains other points 1027 */ 1028 bool CandidateForTesselation::CheckValidity(const double RADIUS, const LinkedCell *LC) const 1029 { 1030 const double radiusSquared = RADIUS; 1031 list<const Vector *> VectorList; 1032 VectorList.push_back(&OptCenter); 1033 VectorList.push_back(&OtherOptCenter); 1034 1035 // check baseline for OptCenter and OtherOptCenter being on sphere's surface 1036 for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) { 1037 for (int i=0;i<2;i++) 1038 if (fabs((*VRunner)->DistanceSquared(BaseLine->endpoints[i]->node->node) - radiusSquared) < MYEPSILON) { 1039 DoeLog(1) && (eLog() << Verbose(1) << "Endpoint " << BaseLine->endpoints[i] << " is out of sphere at " << (*VRunner) << "." << endl); 1040 return false; 1041 } 1042 } 1043 1044 // check Candidates for OptCenter and OtherOptCenter being on sphere's surface 1045 for (TesselPointList::const_iterator Runner = pointlist.begin(); Runner != pointlist.begin(); ++Runner) { 1046 const TesselPoint *Walker = *Runner; 1047 for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) { 1048 if (fabs((*VRunner)->DistanceSquared(Walker->node) - radiusSquared) < MYEPSILON) { 1049 DoeLog(1) && (eLog() << Verbose(1) << "Candidate " << Walker << " is out of sphere at " << (*VRunner) << "." << endl); 1050 return false; 1051 } 1052 } 1053 } 1054 1055 // check for no other points being inside the sphere 1056 bool flag = true; 1057 for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) { 1058 // get all points inside the sphere 1059 TesselPointList *ListofPoints = LC->GetPointsInsideSphere(RADIUS, (*VRunner)); 1060 cout << Verbose(1) << "CheckValidity: There are " << ListofPoints->size() << " points inside the sphere at " << (*VRunner) << "." << endl; 1061 // remove baseline's endpoints and candidates 1062 for (int i=0;i<2;i++) 1063 ListofPoints->remove(BaseLine->endpoints[i]->node); 1064 for (TesselPointList::const_iterator Runner = pointlist.begin(); Runner != pointlist.begin(); ++Runner) 1065 ListofPoints->remove(*Runner); 1066 if (!ListofPoints->empty()) { 1067 flag = false; 1068 DoeLog(1) && (eLog() << Verbose(1) << "External atoms inside of sphere at " << (*VRunner) << ":" << endl); 1069 for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->begin(); ++Runner) 1070 DoeLog(1) && (eLog() << Verbose(1) << " " << *Runner << endl); 1071 } 1072 delete(ListofPoints); 1073 } 1074 return flag; 1075 }; 1076 1077 1021 1078 1022 1079 /** output operator for CandidateForTesselation. … … 2062 2119 for (LC->n[(i+1)%NDIM]=0;LC->n[(i+1)%NDIM]<LC->N[(i+1)%NDIM];LC->n[(i+1)%NDIM]++) 2063 2120 for (LC->n[(i+2)%NDIM]=0;LC->n[(i+2)%NDIM]<LC->N[(i+2)%NDIM];LC->n[(i+2)%NDIM]++) { 2064 const Linked Nodes *List = LC->GetCurrentCell();2121 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 2065 2122 //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl; 2066 2123 if (List != NULL) { 2067 for (Linked Nodes::const_iterator Runner = List->begin();Runner != List->end();Runner++) {2124 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin();Runner != List->end();Runner++) { 2068 2125 if ((*Runner)->node->x[i] > maxCoordinate[i]) { 2069 2126 Log() << Verbose(1) << "New maximal for axis " << i << " node is " << *(*Runner) << " at " << *(*Runner)->node << "." << endl; … … 2471 2528 2472 2529 // go through all angle-sorted candidates (in degenerate n-nodes case we may have to add multiple triangles) 2473 Log() << Verbose(0) << "List of Candidates for Turning Point : " << *TurningPoint << "." << endl;2530 Log() << Verbose(0) << "List of Candidates for Turning Point " << *TurningPoint << ":" << endl; 2474 2531 for (TesselPointList::iterator TesselRunner = connectedClosestPoints->begin(); TesselRunner != connectedClosestPoints->end(); ++TesselRunner) 2475 Log() << Verbose(0) << **TesselRunner << endl;2532 Log() << Verbose(0) << " " << **TesselRunner << endl; 2476 2533 TesselPointList::iterator Runner = connectedClosestPoints->begin(); 2477 2534 TesselPointList::iterator Sprinter = Runner; … … 2809 2866 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) 2810 2867 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 2811 const Linked Nodes *List = LC->GetCurrentCell();2868 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 2812 2869 //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl; 2813 2870 if (List != NULL) { 2814 for (Linked Nodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {2871 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 2815 2872 Candidate = (*Runner); 2816 2873 // check if we only have one unique point yet ... … … 2968 3025 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) 2969 3026 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 2970 const Linked Nodes *List = LC->GetCurrentCell();3027 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 2971 3028 //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl; 2972 3029 if (List != NULL) { 2973 for (Linked Nodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {3030 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 2974 3031 Candidate = (*Runner); 2975 3032 … … 3038 3095 } else { 3039 3096 if ((Candidate != NULL) && (CandidateLine.pointlist.begin() != CandidateLine.pointlist.end())) { 3040 Log() << Verbose(1) << "REJECT: Old candidate " << *(Candidate ) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " ." << endl;3097 Log() << Verbose(1) << "REJECT: Old candidate " << *(CandidateLine.pointlist.begin()) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " ." << endl; 3041 3098 } else { 3042 3099 Log() << Verbose(1) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl; … … 3069 3126 } 3070 3127 3071 Log() << Verbose(1) << "INFO: Sorting candidate list ..." << endl; 3128 DoLog(1) && (Log() << Verbose(1) << "INFO: Checking whether sphere contains candidate list and baseline only ..." << endl); 3129 if (!CandidateLine.CheckValidity(RADIUS, LC)) { 3130 DoeLog(0) && (eLog() << Verbose(0) << "There were other points contained in the rolling sphere as well!" << endl); 3131 performCriticalExit(); 3132 } 3133 3134 DoLog(1) && (Log() << Verbose(1) << "INFO: Sorting candidate list ..." << endl); 3072 3135 if (CandidateLine.pointlist.size() > 1) { 3073 3136 CandidateLine.pointlist.unique(); … … 3135 3198 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) 3136 3199 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 3137 const Linked Nodes *List = LC->GetCurrentCell();3200 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 3138 3201 //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl; 3139 3202 if (List != NULL) { 3140 for (Linked Nodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {3203 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 3141 3204 FindPoint = PointsOnBoundary.find((*Runner)->nr); 3142 3205 if (FindPoint != PointsOnBoundary.end()) { -
src/tesselation.hpp
rfe238c r734816 42 42 43 43 #define DoTecplotOutput 1 44 #define DoRaster3DOutput 145 #define DoVRMLOutput 144 #define DoRaster3DOutput 0 45 #define DoVRMLOutput 0 46 46 #define TecplotSuffix ".dat" 47 47 #define Raster3DSuffix ".r3d" … … 251 251 CandidateForTesselation(TesselPoint* candidate, BoundaryLineSet* currentBaseLine, Vector OptCandidateCenter, Vector OtherOptCandidateCenter); 252 252 ~CandidateForTesselation(); 253 254 bool CheckValidity(const double RADIUS, const LinkedCell *LC) const; 253 255 254 256 TesselPointList pointlist; -
src/tesselationhelpers.cpp
rfe238c r734816 578 578 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) 579 579 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 580 const Linked Nodes *List = LC->GetCurrentCell();580 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 581 581 //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl; 582 582 if (List != NULL) { 583 for (Linked Nodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {583 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 584 584 helper.CopyVector(Point); 585 585 helper.SubtractVector((*Runner)->node); … … 633 633 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) 634 634 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 635 const Linked Nodes *List = LC->GetCurrentCell();635 const LinkedCell::LinkedNodes *List = LC->GetCurrentCell(); 636 636 //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl; 637 637 if (List != NULL) { 638 for (Linked Nodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {638 for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 639 639 helper.CopyVector(Point); 640 640 helper.SubtractVector((*Runner)->node); -
src/unittests/tesselation_boundarytriangleunittest.hpp
rfe238c r734816 35 35 class BoundaryLineSet *lines[3]; 36 36 class BoundaryPointSet *points[3]; 37 Linked Nodes Corners;37 LinkedCell::LinkedNodes Corners; 38 38 }; 39 39 -
src/unittests/tesselation_insideoutsideunittest.cpp
rfe238c r734816 133 133 delete(LinkedList); 134 134 delete(TesselStruct); 135 for (Linked Nodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) {135 for (LinkedCell::LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) { 136 136 delete((*Runner)->node); 137 137 delete(*Runner); -
src/unittests/tesselation_insideoutsideunittest.hpp
rfe238c r734816 31 31 private: 32 32 class Tesselation *TesselStruct; 33 Linked Nodes Corners;33 LinkedCell::LinkedNodes Corners; 34 34 class LinkedCell *LinkedList; 35 35 }; -
src/unittests/tesselationunittest.cpp
rfe238c r734816 101 101 delete(LinkedList); 102 102 delete(TesselStruct); 103 for (Linked Nodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) {103 for (LinkedCell::LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) { 104 104 delete((*Runner)->node); 105 105 delete(*Runner); -
src/unittests/tesselationunittest.hpp
rfe238c r734816 34 34 private: 35 35 class Tesselation *TesselStruct; 36 Linked Nodes Corners;36 LinkedCell::LinkedNodes Corners; 37 37 class LinkedCell *LinkedList; 38 38 };
Note:
See TracChangeset
for help on using the changeset viewer.