Ignore:
Timestamp:
Nov 4, 2009, 5:34:05 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
5f1d021
Parents:
c1b76e
Message:

Extension to the periodic boundary case for analysis_correlation.cpp

other stuff:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselation.cpp

    rc1b76e r20895b  
    25382538  } else {
    25392539    list<TesselPoint*> *connectedClosestPoints = GetCircleOfConnectedPoints(out, trianglePoints[0], x);
    2540     trianglePoints[1] = connectedClosestPoints->front();
    2541     trianglePoints[2] = connectedClosestPoints->back();
    2542     for (int i=0;i<3;i++) {
    2543       if (trianglePoints[i] == NULL) {
    2544         *out << Verbose(1) << "ERROR: IsInnerPoint encounters serious error, point " << i << " not found." << endl;
     2540    if (connectedClosestPoints != NULL) {
     2541      trianglePoints[1] = connectedClosestPoints->front();
     2542      trianglePoints[2] = connectedClosestPoints->back();
     2543      for (int i=0;i<3;i++) {
     2544        if (trianglePoints[i] == NULL) {
     2545          *out << Verbose(1) << "ERROR: IsInnerPoint encounters serious error, point " << i << " not found." << endl;
     2546        }
     2547        //*out << Verbose(2) << "List of triangle points:" << endl;
     2548        //*out << Verbose(3) << *trianglePoints[i] << endl;
    25452549      }
    2546       //*out << Verbose(2) << "List of triangle points:" << endl;
    2547       //*out << Verbose(3) << *trianglePoints[i] << endl;
    2548     }
    2549 
    2550     triangles = FindTriangles(trianglePoints);
    2551     *out << Verbose(2) << "List of possible triangles:" << endl;
    2552     for(list<BoundaryTriangleSet*>::iterator Runner = triangles->begin(); Runner != triangles->end(); Runner++)
    2553       *out << Verbose(3) << **Runner << endl;
    2554 
    2555     delete(connectedClosestPoints);
     2550
     2551      triangles = FindTriangles(trianglePoints);
     2552      *out << Verbose(2) << "List of possible triangles:" << endl;
     2553      for(list<BoundaryTriangleSet*>::iterator Runner = triangles->begin(); Runner != triangles->end(); Runner++)
     2554        *out << Verbose(3) << **Runner << endl;
     2555
     2556      delete(connectedClosestPoints);
     2557    } else {
     2558      triangles = NULL;
     2559      *out << Verbose(1) << "There is no circle of connected points!" << endl;
     2560    }
    25562561  }
    25572562 
    2558   if (triangles->empty()) {
     2563  if ((triangles == NULL) || (triangles->empty())) {
    25592564    *out << Verbose(0) << "ERROR: There is no nearest triangle. Please check the tesselation structure.";
    25602565    delete(triangles);
     
    27242729  Vector helper;
    27252730
     2731  if (connectedPoints == NULL) {
     2732    *out << Verbose(2) << "Could not find any connected points!" << endl;
     2733    delete(connectedCircle);
     2734    return NULL;
     2735  }
    27262736  *out << Verbose(2) << "Begin of GetCircleOfConnectedPoints" << endl;
    27272737
Note: See TracChangeset for help on using the changeset viewer.