Changeset 418117a for molecuilder/src/boundary.cpp
- Timestamp:
- Nov 23, 2009, 6:22:33 PM (16 years ago)
- Children:
- 3d4969
- Parents:
- 09d3b8
- File:
-
- 1 edited
-
molecuilder/src/boundary.cpp (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
r09d3b8 r418117a 176 176 angle = 0.; // otherwise it's a vector in Axis Direction and unimportant for boundary issues 177 177 178 //Log() << Verbose( 0) << "Checking sign in quadrant : " << ProjectedVector.Projection(&AngleReferenceNormalVector) << "." << endl;178 //Log() << Verbose(2) << "Checking sign in quadrant : " << ProjectedVector.Projection(&AngleReferenceNormalVector) << "." << endl; 179 179 if (ProjectedVector.ScalarProduct(&AngleReferenceNormalVector) > 0) { 180 180 angle = 2. * M_PI - angle; … … 214 214 // for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 215 215 // if (runner != BoundaryPoints[axis].begin()) 216 // Log() << Verbose( 0) << ", " << i << ": " << *runner->second.second;216 // Log() << Verbose(2) << ", " << i << ": " << *runner->second.second; 217 217 // else 218 // Log() << Verbose( 0) << i << ": " << *runner->second.second;218 // Log() << Verbose(2) << i << ": " << *runner->second.second; 219 219 // i++; 220 220 // } 221 // Log() << Verbose( 0) << endl;221 // Log() << Verbose(2) << endl; 222 222 // } 223 223 // 3c. throw out points whose distance is less than the mean of left and right neighbours … … 249 249 SideA.SubtractVector(MolCenter); 250 250 SideA.ProjectOntoPlane(&AxisVector); 251 // Log() << Verbose(0) << "SideA: "; 252 // SideA.Output(out); 253 // Log() << Verbose(0) << endl; 251 // Log() << Verbose(0) << "SideA: " << SideA << endl; 254 252 255 253 SideB.CopyVector(&right->second.second->x); 256 254 SideB.SubtractVector(MolCenter); 257 255 SideB.ProjectOntoPlane(&AxisVector); 258 // Log() << Verbose(0) << "SideB: "; 259 // SideB.Output(out); 260 // Log() << Verbose(0) << endl; 256 // Log() << Verbose(0) << "SideB: " << SideB << endl; 261 257 262 258 SideC.CopyVector(&left->second.second->x); 263 259 SideC.SubtractVector(&right->second.second->x); 264 260 SideC.ProjectOntoPlane(&AxisVector); 265 // Log() << Verbose(0) << "SideC: "; 266 // SideC.Output(out); 267 // Log() << Verbose(0) << endl; 261 // Log() << Verbose(0) << "SideC: " << SideC << endl; 268 262 269 263 SideH.CopyVector(&runner->second.second->x); 270 264 SideH.SubtractVector(MolCenter); 271 265 SideH.ProjectOntoPlane(&AxisVector); 272 // Log() << Verbose(0) << "SideH: "; 273 // SideH.Output(out); 274 // Log() << Verbose(0) << endl; 266 // Log() << Verbose(0) << "SideH: " << SideH << endl; 275 267 276 268 // calculate each length … … 335 327 for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 336 328 if (runner != BoundaryPoints[axis].begin()) 337 Log() << Verbose( 0) << ", " << i << ": " << *runner->second.second;329 Log() << Verbose(2) << ", " << i << ": " << *runner->second.second; 338 330 else 339 Log() << Verbose( 0) << i << ": " << *runner->second.second;331 Log() << Verbose(2) << i << ": " << *runner->second.second; 340 332 i++; 341 333 } 342 Log() << Verbose( 0) << endl;334 Log() << Verbose(2) << endl; 343 335 } 344 336 … … 347 339 for (Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) 348 340 if (!TesselStruct->AddBoundaryPoint(runner->second.second, 0)) 349 Log() << Verbose(3) << "WARNING:Point " << *(runner->second.second) << " is already present!" << endl;341 eLog() << Verbose(2) << "Point " << *(runner->second.second) << " is already present!" << endl; 350 342 351 343 Log() << Verbose(2) << "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl; … … 355 347 // Log() << Verbose(1) << "Listing PointsOnBoundary:"; 356 348 // for(PointMap::iterator runner = PointsOnBoundary.begin(); runner != PointsOnBoundary.end(); runner++) { 357 // Log() << Verbose( 0) << " " << *runner->second;349 // Log() << Verbose(1) << " " << *runner->second; 358 350 // } 359 // Log() << Verbose( 0) << endl;351 // Log() << Verbose(1) << endl; 360 352 361 353 // 3a. guess starting triangle … … 406 398 // flip the line 407 399 if (TesselStruct->PickFarthestofTwoBaselines(line) == 0.) 408 Log() << Verbose(1) << "ERROR:Correction of concave baselines failed!" << endl;400 eLog() << Verbose(1) << "Correction of concave baselines failed!" << endl; 409 401 else { 410 402 TesselStruct->FlipBaseline(line); … … 462 454 463 455 if ((TesselStruct == NULL) || (TesselStruct->PointsOnBoundary.empty())) { 464 Log() << Verbose(2) << "ERROR:TesselStruct is empty." << endl;456 eLog() << Verbose(1) << "TesselStruct is empty." << endl; 465 457 return false; 466 458 } … … 470 462 Log() << Verbose(2) << "Remaining points are: "; 471 463 for (PointMap::iterator PointSprinter = TesselStruct->PointsOnBoundary.begin(); PointSprinter != TesselStruct->PointsOnBoundary.end(); PointSprinter++) 472 Log() << Verbose( 0) << *(PointSprinter->second) << "\t";473 Log() << Verbose( 0) << endl;464 Log() << Verbose(2) << *(PointSprinter->second) << "\t"; 465 Log() << Verbose(2) << endl; 474 466 475 467 PointRunner = TesselStruct->PointsOnBoundary.begin(); … … 528 520 // check whether there is something to work on 529 521 if (TesselStruct == NULL) { 530 Log() << Verbose(1) << "ERROR:TesselStruct is empty!" << endl;522 eLog() << Verbose(1) << "TesselStruct is empty!" << endl; 531 523 return volume; 532 524 } … … 756 748 Log() << Verbose(1) << "Minimum volume of the convex envelope contained in a rectangular box is " << minimumvolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl; 757 749 if (minimumvolume > cellvolume) { 758 eLog() << Verbose( 0) << "ERROR:the containing box already has a greater volume than the envisaged cell volume!" << endl;750 eLog() << Verbose(1) << "the containing box already has a greater volume than the envisaged cell volume!" << endl; 759 751 Log() << Verbose(0) << "Setting Box dimensions to minimum possible, the greatest diameters." << endl; 760 752 for (int i = 0; i < NDIM; i++) … … 849 841 for(int i=0;i<NDIM;i++) { 850 842 N[i] = (int) ceil(1./FillerDistance.x[i]); 851 Log() << Verbose( 0) << N[i];843 Log() << Verbose(1) << N[i]; 852 844 if (i != NDIM-1) 853 Log() << Verbose( 0)<< ", ";845 Log() << Verbose(1)<< ", "; 854 846 else 855 Log() << Verbose( 0) << "." << endl;847 Log() << Verbose(1) << "." << endl; 856 848 } 857 849 … … 870 862 // get linked cell list 871 863 if (TesselStruct[i] == NULL) { 872 Log() << Verbose(1) << "ERROR:TesselStruct of " << (*ListRunner) << " is NULL. Didn't we pre-create it?" << endl;864 eLog() << Verbose(1) << "TesselStruct of " << (*ListRunner) << " is NULL. Didn't we pre-create it?" << endl; 873 865 FillIt = false; 874 866 } else { … … 1015 1007 //Log() << Verbose(1) << "Line " << *baseline->second << " has " << baseline->second->triangles.size() << " triangles adjacent" << endl; 1016 1008 if (baseline->second->triangles.size() != 2) 1017 eLog() << Verbose( 1) << "TESSELATION FINISHED WITH INVALID TRIANGLE COUNT!" << endl;1009 eLog() << Verbose(0) << "TESSELATION FINISHED WITH INVALID TRIANGLE COUNT!" << endl; 1018 1010 } 1019 1011
Note:
See TracChangeset
for help on using the changeset viewer.
