diff --git a/KEMField/Source/ExternalFields/Electromagnets/include/KElectromagnetIntegratingFieldSolver.hh b/KEMField/Source/ExternalFields/Electromagnets/include/KElectromagnetIntegratingFieldSolver.hh index d87faeb96..f5b5b1c5f 100644 --- a/KEMField/Source/ExternalFields/Electromagnets/include/KElectromagnetIntegratingFieldSolver.hh +++ b/KEMField/Source/ExternalFields/Electromagnets/include/KElectromagnetIntegratingFieldSolver.hh @@ -49,7 +49,7 @@ template class KIntegratingFieldSolver::const_iterator it; for (it = fContainer.Vector().begin(); it != fContainer.Vector().end(); ++it) - fVectorPotential += fIntegrator.VectorPotential(*(*it), fP); + fVectorPotential = fIntegrator.VectorPotential(*(*it), fP); } private: @@ -80,7 +80,7 @@ template class KIntegratingFieldSolver::const_iterator it; for (it = fContainer.Vector().begin(); it != fContainer.Vector().end(); ++it) - fMagneticField += fIntegrator.MagneticField(*(*it), fP); + fMagneticField = fIntegrator.MagneticField(*(*it), fP); } private: