Changeset 669a7e for molecuilder/src
- Timestamp:
- Jul 9, 2009, 10:38:34 AM (16 years ago)
- Children:
- c12297
- Parents:
- 61e92a
- git-author:
- Frederik Heber <heber@…> (07/09/09 10:36:26)
- git-committer:
- Frederik Heber <heber@…> (07/09/09 10:38:34)
- Location:
- molecuilder/src
- Files:
-
- 3 edited
-
boundary.cpp (modified) (8 diffs)
-
ellipsoid.cpp (modified) (4 diffs)
-
ellipsoid.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
r61e92a r669a7e 1899 1899 double *ShortestAngle, const double RADIUS, LinkedCell *LC 1900 1900 ) { 1901 atom *Walker = NULL;1902 1901 Vector CircleCenter; // center of the circle, i.e. of the band of sphere's centers 1903 1902 Vector CirclePlaneNormal; // normal vector defining the plane this circle lives in … … 1911 1910 double radius; 1912 1911 double alpha, Otheralpha; // angles (i.e. parameter for the circle). 1913 double Nullalpha; // angle between OldSphereCenter and NormalVector of base triangle1914 1912 int N[NDIM], Nlower[NDIM], Nupper[NDIM]; 1915 1913 atom *Candidate = NULL; … … 2071 2069 }; 2072 2070 2073 2074 2071 struct Intersection { 2075 2072 Vector x1; … … 2229 2226 { 2230 2227 cout << Verbose(2) << "Begin of Find_second_point_for_Tesselation" << endl; 2231 int i;2232 2228 Vector AngleCheck; 2233 atom* Walker;2234 2229 double norm = -1., angle; 2235 2230 LinkedAtoms *List = NULL; … … 2327 2322 int i = 0; 2328 2323 LinkedAtoms *List = NULL; 2329 atom* Walker; 2330 atom* FirstPoint; 2331 atom* SecondPoint; 2324 atom* FirstPoint = NULL; 2325 atom* SecondPoint = NULL; 2332 2326 atom* MaxAtom[NDIM]; 2333 2327 double max_coordinate[NDIM]; … … 2505 2499 ofstream *tempstream = NULL; 2506 2500 char NumberName[255]; 2507 double tmp;2508 2501 bool result = true; 2509 2502 CandidateList *Opt_Candidates = new CandidateList(); … … 2662 2655 string NameofTempFile(tempbasename); 2663 2656 NameofTempFile.append(NumberName); 2664 for(size_t npos = NameofTempFile.find_first_of(' '); npos != -1; npos = NameofTempFile.find(' ', npos))2657 for(size_t npos = NameofTempFile.find_first_of(' '); npos != string::npos; npos = NameofTempFile.find(' ', npos)) 2665 2658 NameofTempFile.erase(npos, 1); 2666 2659 NameofTempFile.append(TecplotSuffix); … … 2676 2669 string NameofTempFile(tempbasename); 2677 2670 NameofTempFile.append(NumberName); 2678 for(size_t npos = NameofTempFile.find_first_of(' '); npos != -1; npos = NameofTempFile.find(' ', npos))2671 for(size_t npos = NameofTempFile.find_first_of(' '); npos != string::npos; npos = NameofTempFile.find(' ', npos)) 2679 2672 NameofTempFile.erase(npos, 1); 2680 2673 NameofTempFile.append(Raster3DSuffix); -
molecuilder/src/ellipsoid.cpp
r61e92a r669a7e 213 213 * \param PointsToPick number of points in set to pick 214 214 */ 215 void PickRandomNeighbouredPointSet(ofstream *out, class Tesselation *T, class LinkedCell *LC, Vector *&x, int PointsToPick) 216 { 217 int PointsLeft = 0; 218 int PointsPicked = 0; 219 double value, threshold; 215 void PickRandomNeighbouredPointSet(ofstream *out, class Tesselation *T, class LinkedCell *LC, Vector *&x, size_t PointsToPick) 216 { 217 size_t PointsLeft = 0; 218 size_t PointsPicked = 0; 220 219 int Nlower[NDIM], Nupper[NDIM]; 221 220 set<int> PickedAtomNrs; // ordered list of picked atoms … … 303 302 } 304 303 *out << Verbose(2) << "The following points were picked: " << endl; 305 for ( int i=0;i<PointsPicked;i++)304 for (size_t i=0;i<PointsPicked;i++) 306 305 *out << Verbose(2) << x[i] << endl; 307 306 if (PointsPicked == PointsToPick) // break out of loop if we have all … … 318 317 * \param PointsToPick number of points in set to pick 319 318 */ 320 void PickRandomPointSet(ofstream *out, class Tesselation *T, Vector *&x, int PointsToPick)321 { 322 int PointsLeft =T->PointsOnBoundaryCount;323 int PointsPicked = 0;319 void PickRandomPointSet(ofstream *out, class Tesselation *T, Vector *&x, size_t PointsToPick) 320 { 321 size_t PointsLeft = (size_t) T->PointsOnBoundaryCount; 322 size_t PointsPicked = 0; 324 323 double value, threshold; 325 324 PointMap *List = &T->PointsOnBoundary; … … 348 347 } 349 348 *out << Verbose(2) << "The following points were picked: " << endl; 350 for ( int i=0;i<PointsPicked;i++)349 for (size_t i=0;i<PointsPicked;i++) 351 350 *out << Verbose(3) << x[i] << endl; 352 351 -
molecuilder/src/ellipsoid.hpp
r61e92a r669a7e 22 22 double SumSquaredDistance (const gsl_vector * x, void * params); 23 23 bool FitPointSetToEllipsoid(ofstream *out, Vector *set, int N, Vector *EllipsoidCenter, double *EllipsoidLength, double *EllipsoidAngle); 24 void PickRandomPointSet(ofstream *out, class Tesselation *T, Vector *&x, int N);25 void PickRandomNeighbouredPointSet(ofstream *out, class Tesselation *T, class LinkedCell *LC, Vector *&x, int PointsToPick);24 void PickRandomPointSet(ofstream *out, class Tesselation *T, Vector *&x, size_t PointsToPick); 25 void PickRandomNeighbouredPointSet(ofstream *out, class Tesselation *T, class LinkedCell *LC, Vector *&x, size_t PointsToPick); 26 26 void FindDistributionOfEllipsoids(ofstream *out, class Tesselation *T, class LinkedCell *LCList, int N, int number, const char *filename); 27 27
Note:
See TracChangeset
for help on using the changeset viewer.
