Commit 93c47fa7 authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Introduced a new minimum number of iterations based on relaxation factor


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@3767 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent 6d0aa181
......@@ -102,10 +102,15 @@ namespace Nektar
if(m_sessionVWI->DefinesParameter("Relaxation"))
{
m_vwiRelaxation = m_sessionVWI->GetParameter("Relaxation");
// fix minimum number of iterations to be number of
// iterations required to make contribution of innitial
// forcing to 0.1
m_minInnerIterations = (int) (log(0.1)/log(m_vwiRelaxation));
}
else
{
m_vwiRelaxation = 0.0;
m_minInnerIterations = 1;
}
// Initialise NS Roll solver
......@@ -1067,16 +1072,19 @@ cout<<"alpha = "<<m_alpha[0]<<endl;
{
static NekDouble previous_real_evl = -1.0;
static NekDouble previous_imag_evl = -1.0;
static int min_iter = 0;
if(reset)
{
previous_real_evl = -1.0;
min_iter = 0;
}
if(previous_real_evl == -1.0)
if(previous_real_evl == -1.0 || min_iter < m_minInnerIterations)
{
previous_real_evl = m_leading_real_evl[0];
previous_imag_evl = m_leading_imag_evl[0];
min_iter++;
return false;
}
......
......@@ -152,7 +152,7 @@ namespace Nektar
int m_nOuterIterations;
int m_maxOuterIterations; // Maximum number of outer iterations
int m_minInnerIterations; // Minimum number of iterations in inner loop - based on relaxation factor
int m_maxWaveForceMagIter;
bool m_deltaFcnApprox; // Activate delta function approximation around wave
......
Markdown is supported
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