Skip to content

Commit

Permalink
Merge branch 'mpd'
Browse files Browse the repository at this point in the history
  • Loading branch information
deseilligny committed May 13, 2024
2 parents 47320a7 + 0adef2b commit cb17a27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MMVII/src/UtiMaths/Interpolators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ void cTabulatedInterpolator::SetDiff(const cTabulatedInterpolator & anInt)
void cTabulatedInterpolator::DoNormalize(bool ForDerive)
{
tREAL8 aSomWDif = 0; // observation of inital deviation, for eventual show/debug
tREAL8 aCheckS=0.0; // Check sum, useful 4 derive

int aAmpl = (mSzTot/mNbTabul+3) * mNbTabul;
// Avoid parse twice the phase
Expand All @@ -490,7 +491,6 @@ void cTabulatedInterpolator::DoNormalize(bool ForDerive)


// divide/substratc to all value same phase
tREAL8 aCheckS=0.0;
for (int aKSigned=aKPhase-aAmpl ; aKSigned<aAmpl ; aKSigned+=mNbTabul)
{
int aKAbs = std::abs(aKSigned);
Expand All @@ -504,7 +504,7 @@ void cTabulatedInterpolator::DoNormalize(bool ForDerive)
}
else
{
// if the phase = mNbTabul we dont want to divide twice the result
// if the 2*phase = mNbTabul we dont want to divide twice the result
if ( ((2*aKPhase)!=mNbTabul) || (aKSigned<=0))
{
mDIm->SetV(aKAbs,mDIm->GetV(aKAbs)/aSumV);
Expand All @@ -520,7 +520,7 @@ void cTabulatedInterpolator::DoNormalize(bool ForDerive)
if (0)
{
aSomWDif /= mNbTabul;
StdOut() << "SSS= " << aSomWDif << " NbT=" << mNbTabul << "\n";
StdOut() << "SSS= " << aSomWDif << " NbT=" << mNbTabul << " CheckS=" << aCheckS << "\n";
getchar();
}
}
Expand Down

0 comments on commit cb17a27

Please sign in to comment.