Changeset 0096a40 for src/Fragmentation/Exporters
- Timestamp:
- Sep 10, 2016, 4:14:01 PM (9 years ago)
- Branches:
- SaturateAtoms_singleDegree
- Children:
- 022d3b
- Parents:
- 19bfb5
- git-author:
- Frederik Heber <heber@…> (05/10/16 20:35:40)
- git-committer:
- Frederik Heber <heber@…> (09/10/16 16:14:01)
- Location:
- src/Fragmentation/Exporters
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Exporters/SphericalPointDistribution.cpp
r19bfb5 r0096a40 106 106 107 107 if (_Matching.size() > 1) { 108 // convert matching into two vectors to calculate distance among another108 LOG(3, "INFO: Matching is " << _Matching); 109 109 110 110 // calculate all pair-wise distances … … 127 127 errors.second += gap*gap; 128 128 } 129 } 129 } else 130 ELOG(2, "calculateErrorOfMatching() - Given matching is empty."); 131 LOG(3, "INFO: Resulting errors for matching (L1, L2): " 132 << errors.first << "," << errors.second << "."); 130 133 131 134 return errors; … … 140 143 IndexArray_t indices(_matchingindices.begin(), _matchingindices.end()); 141 144 std::sort(indices.begin(), indices.end()); 145 LOG(4, "DEBUG: sorted matching is " << indices); 142 146 IndexArray_t::const_iterator valueiter = indices.begin(); 143 147 SphericalPointDistribution::Polygon_t::const_iterator pointiter = … … 150 154 remainingreturnpolygon.push_back(*pointiter); 151 155 } 156 LOG(4, "DEBUG: remaining indices are " << remainingreturnpolygon); 152 157 153 158 return remainingreturnpolygon; … … 177 182 "rotatePolygon() - not exactly "+toString(3)+" angles given."); 178 183 rotation.setRotation(_angles[0] * M_PI/180., _angles[1] * M_PI/180., _angles[2] * M_PI/180.); 184 LOG(4, "DEBUG: Rotation matrix is " << rotation); 179 185 180 186 // apply rotation angles … … 209 215 unsigned int _matchingsize) 210 216 { 217 LOG(4, "DEBUG: Recursing with current matching " << _matching 218 << ", remaining indices " << _indices 219 << ", and sought size " << _matchingsize); 211 220 //!> threshold for L1 error below which matching is immediately acceptable 212 221 const double L1THRESHOLD = 1e-2; 213 222 if (!_MCS.foundflag) { 223 LOG(3, "INFO: Current matching has size " << _matching.size() << " of " << _matchingsize); 214 224 if (_matching.size() < _matchingsize) { 215 225 // go through all indices … … 218 228 // add index to matching 219 229 _matching.push_back(*iter); 230 LOG(4, "DEBUG: Adding " << *iter << " to matching."); 220 231 // remove index but keep iterator to position (is the next to erase element) 221 232 IndexList_t::iterator backupiter = _indices.erase(iter); … … 231 242 _MCS.foundflag = true; 232 243 } else { 244 LOG(3, "INFO: Found matching " << _matching); 233 245 // calculate errors 234 246 std::pair<double, double> errors = calculateErrorOfMatching( … … 255 267 VectorArray_t remainingold(_polygon.begin(), _polygon.end()); 256 268 VectorArray_t remainingnew(_newpolygon.begin(), _newpolygon.end()); 269 LOG(3, "INFO: Matching old polygon " << _polygon 270 << " with new polygon " << _newpolygon); 257 271 258 272 if (_polygon.size() > 0) { … … 276 290 recurseMatchings(MCS, matching, indices, matchingsize); 277 291 } 292 LOG(3, "INFO: Best matching is " << MCS.bestmatching); 278 293 279 294 // determine rotation angles to align the two point distributions with … … 292 307 oldCenter *= 1./(double)i; 293 308 newCenter *= 1./(double)i; 309 LOG(3, "INFO: oldCenter is " << oldCenter << ", newCenter is " << newCenter); 294 310 295 311 Vector direction(0.,0.,0.); -
src/Fragmentation/Exporters/SphericalPointDistribution.hpp
r19bfb5 r0096a40 72 72 ); 73 73 74 75 74 //!> default radius of the spherical distribution 76 75 const double Bondlength;
Note:
See TracChangeset
for help on using the changeset viewer.