Changes in src/vector.cpp [a67d19:717e0c]
- File:
-
- 1 edited
-
src/vector.cpp (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/vector.cpp
ra67d19 r717e0c 8 8 #include "defs.hpp" 9 9 #include "helpers.hpp" 10 #include "info.hpp" 11 #include "gslmatrix.hpp" 10 #include "memoryallocator.hpp" 12 11 #include "leastsquaremin.hpp" 13 12 #include "log.hpp" 14 #include "memoryallocator.hpp"15 13 #include "vector.hpp" 16 14 #include "verbose.hpp" 17 #include "World.hpp"18 19 #include <gsl/gsl_linalg.h>20 #include <gsl/gsl_matrix.h>21 #include <gsl/gsl_permutation.h>22 #include <gsl/gsl_vector.h>23 15 24 16 /************************************ Functions for class vector ************************************/ … … 27 19 */ 28 20 Vector::Vector() { x[0] = x[1] = x[2] = 0.; }; 29 30 /** Constructor of class vector.31 */32 Vector::Vector(const Vector * const a)33 {34 x[0] = a->x[0];35 x[1] = a->x[1];36 x[2] = a->x[2];37 };38 39 /** Constructor of class vector.40 */41 Vector::Vector(const Vector &a)42 {43 x[0] = a.x[0];44 x[1] = a.x[1];45 x[2] = a.x[2];46 };47 21 48 22 /** Constructor of class vector. … … 241 215 * \param *Origin first vector of line 242 216 * \param *LineVector second vector of line 243 * \return true - \a this contains intersection point on return, false - line is parallel to plane (even if in-plane)217 * \return true - \a this contains intersection point on return, false - line is parallel to plane 244 218 */ 245 219 bool Vector::GetIntersectionWithPlane(const Vector * const PlaneNormal, const Vector * const PlaneOffset, const Vector * const Origin, const Vector * const LineVector) 246 220 { 247 Info FunctionInfo(__func__);248 221 double factor; 249 222 Vector Direction, helper; … … 253 226 Direction.SubtractVector(Origin); 254 227 Direction.Normalize(); 255 DoLog(1) && (Log() << Verbose(1) << "INFO: Direction is " << Direction << "." << endl); 256 //Log() << Verbose(1) << "INFO: PlaneNormal is " << *PlaneNormal << " and PlaneOffset is " << *PlaneOffset << "." << endl; 228 //Log() << Verbose(4) << "INFO: Direction is " << Direction << "." << endl; 257 229 factor = Direction.ScalarProduct(PlaneNormal); 258 if (fa bs(factor)< MYEPSILON) { // Uniqueness: line parallel to plane?259 DoLog(1) && (Log() << Verbose(1) << "BAD: Line is parallel to plane, no intersection." << endl);230 if (factor < MYEPSILON) { // Uniqueness: line parallel to plane? 231 eLog() << Verbose(2) << "Line is parallel to plane, no intersection." << endl; 260 232 return false; 261 233 } … … 263 235 helper.SubtractVector(Origin); 264 236 factor = helper.ScalarProduct(PlaneNormal)/factor; 265 if (fa bs(factor)< MYEPSILON) { // Origin is in-plane266 DoLog(1) && (Log() << Verbose(1) << "GOOD: Origin of line is in-plane." << endl);237 if (factor < MYEPSILON) { // Origin is in-plane 238 //Log() << Verbose(2) << "Origin of line is in-plane, simple." << endl; 267 239 CopyVector(Origin); 268 240 return true; … … 271 243 Direction.Scale(factor); 272 244 CopyVector(Origin); 273 DoLog(1) && (Log() << Verbose(1) << "INFO: Scaled direction is " << Direction << "." << endl);245 //Log() << Verbose(4) << "INFO: Scaled direction is " << Direction << "." << endl; 274 246 AddVector(&Direction); 275 247 … … 278 250 helper.SubtractVector(PlaneOffset); 279 251 if (helper.ScalarProduct(PlaneNormal) < MYEPSILON) { 280 DoLog(1) && (Log() << Verbose(1) << "GOOD: Intersection is " << *this << "." << endl);252 //Log() << Verbose(2) << "INFO: Intersection at " << *this << " is good." << endl; 281 253 return true; 282 254 } else { 283 DoeLog(2) && (eLog()<< Verbose(2) << "Intersection point " << *this << " is not on plane." << endl);255 eLog() << Verbose(2) << "Intersection point " << *this << " is not on plane." << endl; 284 256 return false; 285 257 } 286 258 }; 287 259 288 /** Calculates the minimum distance vectorof this vector to the plane.260 /** Calculates the minimum distance of this vector to the plane. 289 261 * \param *out output stream for debugging 290 262 * \param *PlaneNormal normal of plane 291 263 * \param *PlaneOffset offset of plane 292 * \return distance vector ontoto plane293 */ 294 Vector Vector::GetDistanceVectorToPlane(const Vector * const PlaneNormal, const Vector * const PlaneOffset) const264 * \return distance to plane 265 */ 266 double Vector::DistanceToPlane(const Vector * const PlaneNormal, const Vector * const PlaneOffset) const 295 267 { 296 268 Vector temp; … … 310 282 sign = 0.; 311 283 312 temp.Normalize(); 313 temp.Scale(sign); 314 return temp; 315 }; 316 317 /** Calculates the minimum distance of this vector to the plane. 318 * \sa Vector::GetDistanceVectorToPlane() 319 * \param *out output stream for debugging 320 * \param *PlaneNormal normal of plane 321 * \param *PlaneOffset offset of plane 322 * \return distance to plane 323 */ 324 double Vector::DistanceToPlane(const Vector * const PlaneNormal, const Vector * const PlaneOffset) const 325 { 326 return GetDistanceVectorToPlane(PlaneNormal,PlaneOffset).Norm(); 284 return (temp.Norm()*sign); 327 285 }; 328 286 329 287 /** Calculates the intersection of the two lines that are both on the same plane. 330 * This is taken from Weisstein, Eric W. "Line-Line Intersection." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Line-LineIntersection.html 288 * We construct auxiliary plane with its vector normal to one line direction and the PlaneNormal, then a vector 289 * from the first line's offset onto the plane. Finally, scale by factor is 1/cos(angle(line1,line2..)) = 1/SP(...), and 290 * project onto the first line's direction and add its offset. 331 291 * \param *out output stream for debugging 332 292 * \param *Line1a first vector of first line … … 339 299 bool Vector::GetIntersectionOfTwoLinesOnPlane(const Vector * const Line1a, const Vector * const Line1b, const Vector * const Line2a, const Vector * const Line2b, const Vector *PlaneNormal) 340 300 { 341 Info FunctionInfo(__func__); 342 343 GSLMatrix *M = new GSLMatrix(4,4); 344 345 M->SetAll(1.); 346 for (int i=0;i<3;i++) { 347 M->Set(0, i, Line1a->x[i]); 348 M->Set(1, i, Line1b->x[i]); 349 M->Set(2, i, Line2a->x[i]); 350 M->Set(3, i, Line2b->x[i]); 351 } 352 353 //Log() << Verbose(1) << "Coefficent matrix is:" << endl; 354 //ostream &output = Log() << Verbose(1); 355 //for (int i=0;i<4;i++) { 356 // for (int j=0;j<4;j++) 357 // output << "\t" << M->Get(i,j); 358 // output << endl; 359 //} 360 if (fabs(M->Determinant()) > MYEPSILON) { 361 DoLog(1) && (Log() << Verbose(1) << "Determinant of coefficient matrix is NOT zero." << endl); 301 bool result = true; 302 Vector Direction, OtherDirection; 303 Vector AuxiliaryNormal; 304 Vector Distance; 305 const Vector *Normal = NULL; 306 Vector *ConstructedNormal = NULL; 307 bool FreeNormal = false; 308 309 // construct both direction vectors 310 Zero(); 311 Direction.CopyVector(Line1b); 312 Direction.SubtractVector(Line1a); 313 if (Direction.IsZero()) 362 314 return false; 363 } 364 DoLog(1) && (Log() << Verbose(1) << "INFO: Line1a = " << *Line1a << ", Line1b = " << *Line1b << ", Line2a = " << *Line2a << ", Line2b = " << *Line2b << "." << endl); 365 366 367 // constuct a,b,c 368 Vector a; 369 Vector b; 370 Vector c; 371 Vector d; 372 a.CopyVector(Line1b); 373 a.SubtractVector(Line1a); 374 b.CopyVector(Line2b); 375 b.SubtractVector(Line2a); 376 c.CopyVector(Line2a); 377 c.SubtractVector(Line1a); 378 d.CopyVector(Line2b); 379 d.SubtractVector(Line1b); 380 DoLog(1) && (Log() << Verbose(1) << "INFO: a = " << a << ", b = " << b << ", c = " << c << "." << endl); 381 if ((a.NormSquared() < MYEPSILON) || (b.NormSquared() < MYEPSILON)) { 382 Zero(); 383 DoLog(1) && (Log() << Verbose(1) << "At least one of the lines is ill-defined, i.e. offset equals second vector." << endl); 384 return false; 385 } 386 387 // check for parallelity 388 Vector parallel; 389 double factor = 0.; 390 if (fabs(a.ScalarProduct(&b)*a.ScalarProduct(&b)/a.NormSquared()/b.NormSquared() - 1.) < MYEPSILON) { 391 parallel.CopyVector(Line1a); 392 parallel.SubtractVector(Line2a); 393 factor = parallel.ScalarProduct(&a)/a.Norm(); 394 if ((factor >= -MYEPSILON) && (factor - 1. < MYEPSILON)) { 395 CopyVector(Line2a); 396 DoLog(1) && (Log() << Verbose(1) << "Lines conincide." << endl); 397 return true; 315 OtherDirection.CopyVector(Line2b); 316 OtherDirection.SubtractVector(Line2a); 317 if (OtherDirection.IsZero()) 318 return false; 319 320 Direction.Normalize(); 321 OtherDirection.Normalize(); 322 323 //Log() << Verbose(4) << "INFO: Normalized Direction " << Direction << " and OtherDirection " << OtherDirection << "." << endl; 324 325 if (fabs(OtherDirection.ScalarProduct(&Direction) - 1.) < MYEPSILON) { // lines are parallel 326 if ((Line1a == Line2a) || (Line1a == Line2b)) 327 CopyVector(Line1a); 328 else if ((Line1b == Line2b) || (Line1b == Line2b)) 329 CopyVector(Line1b); 330 else 331 return false; 332 Log() << Verbose(4) << "INFO: Intersection is " << *this << "." << endl; 333 return true; 334 } else { 335 // check whether we have a plane normal vector 336 if (PlaneNormal == NULL) { 337 ConstructedNormal = new Vector; 338 ConstructedNormal->MakeNormalVector(&Direction, &OtherDirection); 339 Normal = ConstructedNormal; 340 FreeNormal = true; 341 } else 342 Normal = PlaneNormal; 343 344 AuxiliaryNormal.MakeNormalVector(&OtherDirection, Normal); 345 //Log() << Verbose(4) << "INFO: PlaneNormal is " << *Normal << " and AuxiliaryNormal " << AuxiliaryNormal << "." << endl; 346 347 Distance.CopyVector(Line2a); 348 Distance.SubtractVector(Line1a); 349 //Log() << Verbose(4) << "INFO: Distance is " << Distance << "." << endl; 350 if (Distance.IsZero()) { 351 // offsets are equal, match found 352 CopyVector(Line1a); 353 result = true; 398 354 } else { 399 parallel.CopyVector(Line1a); 400 parallel.SubtractVector(Line2b); 401 factor = parallel.ScalarProduct(&a)/a.Norm(); 402 if ((factor >= -MYEPSILON) && (factor - 1. < MYEPSILON)) { 403 CopyVector(Line2b); 404 DoLog(1) && (Log() << Verbose(1) << "Lines conincide." << endl); 405 return true; 406 } 355 CopyVector(Distance.Projection(&AuxiliaryNormal)); 356 //Log() << Verbose(4) << "INFO: Projected Distance is " << *this << "." << endl; 357 double factor = Direction.ScalarProduct(&AuxiliaryNormal); 358 //Log() << Verbose(4) << "INFO: Scaling factor is " << factor << "." << endl; 359 Scale(1./(factor*factor)); 360 //Log() << Verbose(4) << "INFO: Scaled Distance is " << *this << "." << endl; 361 CopyVector(Projection(&Direction)); 362 //Log() << Verbose(4) << "INFO: Distance, projected into Direction, is " << *this << "." << endl; 363 if (this->IsZero()) 364 result = false; 365 else 366 result = true; 367 AddVector(Line1a); 407 368 } 408 DoLog(1) && (Log() << Verbose(1) << "Lines are parallel." << endl); 409 Zero(); 410 return false; 411 } 412 413 // obtain s 414 double s; 415 Vector temp1, temp2; 416 temp1.CopyVector(&c); 417 temp1.VectorProduct(&b); 418 temp2.CopyVector(&a); 419 temp2.VectorProduct(&b); 420 DoLog(1) && (Log() << Verbose(1) << "INFO: temp1 = " << temp1 << ", temp2 = " << temp2 << "." << endl); 421 if (fabs(temp2.NormSquared()) > MYEPSILON) 422 s = temp1.ScalarProduct(&temp2)/temp2.NormSquared(); 423 else 424 s = 0.; 425 DoLog(1) && (Log() << Verbose(1) << "Factor s is " << temp1.ScalarProduct(&temp2) << "/" << temp2.NormSquared() << " = " << s << "." << endl); 426 427 // construct intersection 428 CopyVector(&a); 429 Scale(s); 430 AddVector(Line1a); 431 DoLog(1) && (Log() << Verbose(1) << "Intersection is at " << *this << "." << endl); 432 433 return true; 369 370 if (FreeNormal) 371 delete(ConstructedNormal); 372 } 373 if (result) 374 Log() << Verbose(4) << "INFO: Intersection is " << *this << "." << endl; 375 376 return result; 434 377 }; 435 378 … … 537 480 else 538 481 return false; 539 };540 541 /** Checks whether vector is normal to \a *normal.542 * @return true - vector is normalized, false - vector is not543 */544 bool Vector::IsEqualTo(const Vector * const a) const545 {546 bool status = true;547 for (int i=0;i<NDIM;i++) {548 if (fabs(x[i] - a->x[i]) > MYEPSILON)549 status = false;550 }551 return status;552 482 }; 553 483 … … 702 632 void Vector::Output() const 703 633 { 704 DoLog(0) && (Log() << Verbose(0) << "(");634 Log() << Verbose(0) << "("; 705 635 for (int i=0;i<NDIM;i++) { 706 DoLog(0) && (Log() << Verbose(0) << x[i]);636 Log() << Verbose(0) << x[i]; 707 637 if (i != 2) 708 DoLog(0) && (Log() << Verbose(0) << ",");709 } 710 DoLog(0) && (Log() << Verbose(0) << ")");638 Log() << Verbose(0) << ","; 639 } 640 Log() << Verbose(0) << ")"; 711 641 }; 712 642 … … 817 747 x[i] = C.x[i]; 818 748 } else { 819 DoeLog(1) && (eLog()<< Verbose(1) << "inverse of matrix does not exists: det A = " << detA << "." << endl);749 eLog() << Verbose(1) << "inverse of matrix does not exists: det A = " << detA << "." << endl; 820 750 } 821 751 }; … … 843 773 projection = ScalarProduct(n)/n->ScalarProduct(n); // remove constancy from n (keep as logical one) 844 774 // withdraw projected vector twice from original one 845 DoLog(1) && (Log() << Verbose(1) << "Vector: ");775 Log() << Verbose(1) << "Vector: "; 846 776 Output(); 847 DoLog(0) && (Log() << Verbose(0) << "\t");777 Log() << Verbose(0) << "\t"; 848 778 for (int i=NDIM;i--;) 849 779 x[i] -= 2.*projection*n->x[i]; 850 DoLog(0) && (Log() << Verbose(0) << "Projected vector: ");780 Log() << Verbose(0) << "Projected vector: "; 851 781 Output(); 852 DoLog(0) && (Log() << Verbose(0) << endl);782 Log() << Verbose(0) << endl; 853 783 }; 854 784 … … 869 799 x2.SubtractVector(y2); 870 800 if ((fabs(x1.Norm()) < MYEPSILON) || (fabs(x2.Norm()) < MYEPSILON) || (fabs(x1.Angle(&x2)) < MYEPSILON)) { 871 DoeLog(2) && (eLog()<< Verbose(2) << "Given vectors are linear dependent." << endl);801 eLog() << Verbose(2) << "Given vectors are linear dependent." << endl; 872 802 return false; 873 803 } … … 903 833 Zero(); 904 834 if ((fabs(x1.Norm()) < MYEPSILON) || (fabs(x2.Norm()) < MYEPSILON) || (fabs(x1.Angle(&x2)) < MYEPSILON)) { 905 DoeLog(2) && (eLog()<< Verbose(2) << "Given vectors are linear dependent." << endl);835 eLog() << Verbose(2) << "Given vectors are linear dependent." << endl; 906 836 return false; 907 837 } … … 954 884 double norm; 955 885 956 DoLog(4) && (Log() << Verbose(4));886 Log() << Verbose(4); 957 887 GivenVector->Output(); 958 DoLog(0) && (Log() << Verbose(0) << endl);888 Log() << Verbose(0) << endl; 959 889 for (j=NDIM;j--;) 960 890 Components[j] = -1; … … 963 893 if (fabs(GivenVector->x[j]) > MYEPSILON) 964 894 Components[Last++] = j; 965 DoLog(4) && (Log() << Verbose(4) << Last << " Components != 0: (" << Components[0] << "," << Components[1] << "," << Components[2] << ")" << endl);895 Log() << Verbose(4) << Last << " Components != 0: (" << Components[0] << "," << Components[1] << "," << Components[2] << ")" << endl; 966 896 967 897 switch(Last) { … … 1013 943 1014 944 for (j=0;j<num;j++) { 1015 DoLog(1) && (Log() << Verbose(1) << j << "th atom's vector: ");945 Log() << Verbose(1) << j << "th atom's vector: "; 1016 946 (vectors[j])->Output(); 1017 DoLog(0) && (Log() << Verbose(0) << endl);947 Log() << Verbose(0) << endl; 1018 948 } 1019 949 … … 1135 1065 j += i+1; 1136 1066 do { 1137 DoLog(0) && (Log() << Verbose(0) << coords[i] << "[0.." << cell_size[j] << "]: ");1067 Log() << Verbose(0) << coords[i] << "[0.." << cell_size[j] << "]: "; 1138 1068 cin >> x[i]; 1139 1069 } while (((x[i] < 0) || (x[i] >= cell_size[j])) && (check)); … … 1166 1096 B2 = cos(beta) * x2->Norm() * c; 1167 1097 C = c * c; 1168 DoLog(2) && (Log() << Verbose(2) << "A " << A << "\tB " << B1 << "\tC " << C << endl);1098 Log() << Verbose(2) << "A " << A << "\tB " << B1 << "\tC " << C << endl; 1169 1099 int flag = 0; 1170 1100 if (fabs(x1->x[0]) < MYEPSILON) { // check for zero components for the later flipping and back-flipping … … 1205 1135 D2 = -y->x[0]/x1->x[0]*x1->x[2]+y->x[2]; 1206 1136 D3 = y->x[0]/x1->x[0]*A-B1; 1207 DoLog(2) && (Log() << Verbose(2) << "D1 " << D1 << "\tD2 " << D2 << "\tD3 " << D3 << "\n");1137 Log() << Verbose(2) << "D1 " << D1 << "\tD2 " << D2 << "\tD3 " << D3 << "\n"; 1208 1138 if (fabs(D1) < MYEPSILON) { 1209 DoLog(2) && (Log() << Verbose(2) << "D1 == 0!\n");1139 Log() << Verbose(2) << "D1 == 0!\n"; 1210 1140 if (fabs(D2) > MYEPSILON) { 1211 DoLog(3) && (Log() << Verbose(3) << "D2 != 0!\n");1141 Log() << Verbose(3) << "D2 != 0!\n"; 1212 1142 x[2] = -D3/D2; 1213 1143 E1 = A/x1->x[0] + x1->x[2]/x1->x[0]*D3/D2; 1214 1144 E2 = -x1->x[1]/x1->x[0]; 1215 DoLog(3) && (Log() << Verbose(3) << "E1 " << E1 << "\tE2 " << E2 << "\n");1145 Log() << Verbose(3) << "E1 " << E1 << "\tE2 " << E2 << "\n"; 1216 1146 F1 = E1*E1 + 1.; 1217 1147 F2 = -E1*E2; 1218 1148 F3 = E1*E1 + D3*D3/(D2*D2) - C; 1219 DoLog(3) && (Log() << Verbose(3) << "F1 " << F1 << "\tF2 " << F2 << "\tF3 " << F3 << "\n");1149 Log() << Verbose(3) << "F1 " << F1 << "\tF2 " << F2 << "\tF3 " << F3 << "\n"; 1220 1150 if (fabs(F1) < MYEPSILON) { 1221 DoLog(4) && (Log() << Verbose(4) << "F1 == 0!\n");1222 DoLog(4) && (Log() << Verbose(4) << "Gleichungssystem linear\n");1151 Log() << Verbose(4) << "F1 == 0!\n"; 1152 Log() << Verbose(4) << "Gleichungssystem linear\n"; 1223 1153 x[1] = F3/(2.*F2); 1224 1154 } else { 1225 1155 p = F2/F1; 1226 1156 q = p*p - F3/F1; 1227 DoLog(4) && (Log() << Verbose(4) << "p " << p << "\tq " << q << endl);1157 Log() << Verbose(4) << "p " << p << "\tq " << q << endl; 1228 1158 if (q < 0) { 1229 DoLog(4) && (Log() << Verbose(4) << "q < 0" << endl);1159 Log() << Verbose(4) << "q < 0" << endl; 1230 1160 return false; 1231 1161 } … … 1234 1164 x[0] = A/x1->x[0] - x1->x[1]/x1->x[0]*x[1] + x1->x[2]/x1->x[0]*x[2]; 1235 1165 } else { 1236 DoLog(2) && (Log() << Verbose(2) << "Gleichungssystem unterbestimmt\n");1166 Log() << Verbose(2) << "Gleichungssystem unterbestimmt\n"; 1237 1167 return false; 1238 1168 } … … 1240 1170 E1 = A/x1->x[0]+x1->x[1]/x1->x[0]*D3/D1; 1241 1171 E2 = x1->x[1]/x1->x[0]*D2/D1 - x1->x[2]; 1242 DoLog(2) && (Log() << Verbose(2) << "E1 " << E1 << "\tE2 " << E2 << "\n");1172 Log() << Verbose(2) << "E1 " << E1 << "\tE2 " << E2 << "\n"; 1243 1173 F1 = E2*E2 + D2*D2/(D1*D1) + 1.; 1244 1174 F2 = -(E1*E2 + D2*D3/(D1*D1)); 1245 1175 F3 = E1*E1 + D3*D3/(D1*D1) - C; 1246 DoLog(2) && (Log() << Verbose(2) << "F1 " << F1 << "\tF2 " << F2 << "\tF3 " << F3 << "\n");1176 Log() << Verbose(2) << "F1 " << F1 << "\tF2 " << F2 << "\tF3 " << F3 << "\n"; 1247 1177 if (fabs(F1) < MYEPSILON) { 1248 DoLog(3) && (Log() << Verbose(3) << "F1 == 0!\n");1249 DoLog(3) && (Log() << Verbose(3) << "Gleichungssystem linear\n");1178 Log() << Verbose(3) << "F1 == 0!\n"; 1179 Log() << Verbose(3) << "Gleichungssystem linear\n"; 1250 1180 x[2] = F3/(2.*F2); 1251 1181 } else { 1252 1182 p = F2/F1; 1253 1183 q = p*p - F3/F1; 1254 DoLog(3) && (Log() << Verbose(3) << "p " << p << "\tq " << q << endl);1184 Log() << Verbose(3) << "p " << p << "\tq " << q << endl; 1255 1185 if (q < 0) { 1256 DoLog(3) && (Log() << Verbose(3) << "q < 0" << endl);1186 Log() << Verbose(3) << "q < 0" << endl; 1257 1187 return false; 1258 1188 } … … 1292 1222 for (j=2;j>=0;j--) { 1293 1223 k = (i & pot(2,j)) << j; 1294 DoLog(2) && (Log() << Verbose(2) << "k " << k << "\tpot(2,j) " << pot(2,j) << endl);1224 Log() << Verbose(2) << "k " << k << "\tpot(2,j) " << pot(2,j) << endl; 1295 1225 sign[j] = (k == 0) ? 1. : -1.; 1296 1226 } 1297 DoLog(2) && (Log() << Verbose(2) << i << ": sign matrix is " << sign[0] << "\t" << sign[1] << "\t" << sign[2] << "\n");1227 Log() << Verbose(2) << i << ": sign matrix is " << sign[0] << "\t" << sign[1] << "\t" << sign[2] << "\n"; 1298 1228 // apply sign matrix 1299 1229 for (j=NDIM;j--;) … … 1301 1231 // calculate angle and check 1302 1232 ang = x2->Angle (this); 1303 DoLog(1) && (Log() << Verbose(1) << i << "th angle " << ang << "\tbeta " << cos(beta) << " :\t");1233 Log() << Verbose(1) << i << "th angle " << ang << "\tbeta " << cos(beta) << " :\t"; 1304 1234 if (fabs(ang - cos(beta)) < MYEPSILON) { 1305 1235 break;
Note:
See TracChangeset
for help on using the changeset viewer.
