Commit 220c777d authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Updated Set_Rhs_Magnitude to use a predefined weight. Also introduced a switch...

Updated Set_Rhs_Magnitude to use a predefined weight. Also introduced a switch not to use the weight when running the Multi-Level static Condensation
parent 26db4e60
......@@ -53,7 +53,7 @@ namespace Nektar
&pLocToGloMap)
: GlobalLinSys(pKey, pExpList, pLocToGloMap),
m_rhs_magnitude(NekConstants::kNekUnsetDouble),
m_rhs_mag_cnt(0),
m_rhs_mag_sm(0.9),
m_precon(NullPreconditionerSharedPtr),
m_totalIterations(0),
m_useProjection(false),
......@@ -431,7 +431,6 @@ namespace Nektar
<< ", rhs_mag = " << sqrt(m_rhs_magnitude) << ")"
<< endl;
}
//m_rhs_magnitude = NekConstants::kNekUnsetDouble;
return;
}
......@@ -562,11 +561,9 @@ namespace Nektar
}
else
{
m_rhs_magnitude = (m_rhs_mag_cnt*(m_rhs_magnitude) +
new_rhs_mag)/(NekDouble)(m_rhs_mag_cnt+1);
m_rhs_magnitude = (m_rhs_mag_sm*(m_rhs_magnitude) +
(1.0-m_rhs_mag_sm)*new_rhs_mag);
}
m_rhs_mag_cnt = min(m_rhs_mag_cnt+1,1000);
}
}
......
......@@ -74,7 +74,7 @@ namespace Nektar
NekDouble m_rhs_magnitude;
/// cnt to how many times rhs_magnitude is called
int m_rhs_mag_cnt;
NekDouble m_rhs_mag_sm;
PreconditionerSharedPtr m_precon;
......
......@@ -538,7 +538,15 @@ namespace Nektar
m_precon->BuildPreconditioner();
}
if(m_locToGloMap->GetNextLevelLocalToGlobalMap())
{
// for multilevel iterative solver always use rhs
// vector value with no weighting
m_rhs_magnitude = NekConstants::kNekUnsetDouble;
}
Set_Rhs_Magnitude(F_GlobBnd);
return m_S1Blk;
}
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment