Changeset fdc567 for src/Potentials/PartialNucleiChargeFitter.cpp
- Timestamp:
- Oct 10, 2016, 12:34:32 PM (9 years ago)
- Branches:
- Fix_FitPartialCharges
- Children:
- eb40e3
- Parents:
- 213f9d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/PartialNucleiChargeFitter.cpp
r213f9d rfdc567 305 305 } 306 306 307 VectorContent PartialNucleiChargeFitter::calculateResiduum() 308 { 309 // need to reconstruct matrix as it was overwritten by SVD 310 if (PotentialFromCharges == NULL) 311 constructMatrix(); 312 313 // calculate residual vector 314 VectorContent residuum = (*PotentialFromCharges) * (*PartialCharges) - SampledPotential; 315 316 return residuum; 317 } 318 307 319 double PartialNucleiChargeFitter::operator()() 308 320 { … … 327 339 LOG(2, "DEBUG: Norm of right-hand side is " << SampledPotential.Norm()); 328 340 329 // need to reconstruct matrix as it was overwritten by SVD 330 constructMatrix(); 331 332 // calculate residual vector 333 VectorContent residuum = (*PotentialFromCharges) * (*PartialCharges) - SampledPotential; 341 // calculate residuum (force matrix reconstruction) 342 delete PotentialFromCharges; 343 VectorContent residuum = calculateResiduum(); 334 344 335 345 #ifndef NDEBUG
Note:
See TracChangeset
for help on using the changeset viewer.