Changeset 407d2c


Ignore:
Timestamp:
Mar 20, 2017, 3:03:17 PM (8 years ago)
Author:
Frederik Heber <heber@…>
Branches:
FitPartialCharges_GlobalError, PartialCharges_OrthogonalSummation
Children:
2f9faf
Parents:
f88216
git-author:
Frederik Heber <heber@…> (10/09/16 21:19:12)
git-committer:
Frederik Heber <heber@…> (03/20/17 15:03:17)
Message:

FIX: PartialNucleiChargeFitter needs to reconstruct matrix after SVD.

  • SVD overwrites original matrix and this causes the residuum to be calculated wrong.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/PartialNucleiChargeFitter.cpp

    rf88216 r407d2c  
    325325//  LOG(4, "DEBUG: Solution vector is " << (*PotentialFromCharges) * (*PartialCharges) << ".");
    326326
     327  LOG(2, "DEBUG: Norm of right-hand side is " << SampledPotential.Norm());
     328
     329  // need to reconstruct matrix as it was overwritten by SVD
     330  constructMatrix();
     331
    327332  // calculate residual vector
    328333  VectorContent residuum = (*PotentialFromCharges) * (*PartialCharges) - SampledPotential;
     
    366371void PartialNucleiChargeFitter::writeMatrix()
    367372{
    368   constructMatrix();
     373  // only construct if not yet present
     374  if (PotentialFromCharges == NULL)
     375    constructMatrix();
    369376
    370377  // write matrix as paraview csv file file
Note: See TracChangeset for help on using the changeset viewer.