48 int main(
int argc,
char *argv[])
73 Mvdir(
"Save", WaveForce);
77 Mvdir(
"Save_Outer", WaveForce);
85 catch (
const std::runtime_error &)
90 catch (
const std::string &eStr)
92 cout <<
"Error: " << eStr << endl;
99 string saveOuterIter =
"mv -f OuterIter.his " + dir;
100 if (system(saveOuterIter.c_str()))
102 ASSERTL0(
false, saveOuterIter.c_str());
106 string newdir = dir + boost::lexical_cast<std::string>(dir_ending);
107 string syscall =
"mv -f " + dir +
" " + newdir;
109 if (system(syscall.c_str()))
115 syscall =
"mkdir " + dir;
116 ASSERTL0(system(syscall.c_str()) == 0,
117 "Failed to make directory '" + dir +
"'");
132 bool exit_iteration =
false;
134 while (exit_iteration ==
false)
155 cout <<
"Failed to converge growth rate in"
156 <<
" inner iteration after " << vwi.
GetIterEnd()
163 if (exit_iteration ==
false)
170 cerr <<
"Failed to converge after "
173 exit_iteration =
true;
182 bool exit_iteration =
false;
195 while (exit_iteration ==
false)
216 cout <<
"Failed to converge growth rate in"
217 <<
" inner iteration after " << vwi.
GetIterEnd()
226 cout <<
"m_alpha[0] is " << vwi.
GetAlpha() << endl;
228 if (exit_iteration ==
false)
238 if ((exit_iteration ==
true) && (init_search == 1))
244 exit_iteration =
false;
249 cerr <<
"Failed to converge after "
252 exit_iteration =
true;
272 bool exit_iteration =
false;
274 while (exit_iteration ==
false)
276 bool exit_alphaIter =
false;
288 if (exit_alphaIter ==
false)
303 cout <<
"Failed to converge growth rate in"
304 <<
" inner iteration after " << vwi.
GetIterEnd()
309 vwi.
MoveFile(
"AlphaIter.his",
"Save_Outer", nouter_iter);
318 exit_iteration =
true;
323 cerr <<
"Failed to converge after "
326 exit_iteration =
true;
332 ASSERTL0(
false,
"Unknown iteration type");
#define ASSERTL0(condition, msg)
int main(int argc, char *argv[])
void Mvdir(string dir, NekDouble dir_ending)
void DoFixedForcingIteration(VortexWaveInteraction &vwi)
NekDouble GetAlphaStep(void)
void SetAlpha(NekDouble alpha)
int GetNOuterIterations(void)
bool CheckEigIsStationary(bool reset=false)
int GetMinInnerIterations(void)
void SetPrevAlpha(NekDouble alpha)
NekDouble GetPrevAlpha(void)
void SetMinInnerIterations(int niter)
void SetWaveForceMag(NekDouble mag)
void SaveLoopDetails(std::string dir, int i)
bool IfIterInterface(void)
bool CheckIfAtNeutralPoint(void)
void SetEigRelTol(NekDouble tol)
int GetMaxOuterIterations(void)
int GetMaxWaveForceMagIter(void)
void ExecuteLoop(bool CalcWaveForce=true)
void CalcNonLinearWaveForce(void)
NekDouble GetWaveForceMag(void)
void MoveFile(std::string fileend, std::string dir, int n)
void AppendEvlToFile(std::string file, int n)
void UpdateDAlphaDWaveForceMag(NekDouble alphainit)
NekDouble GetEigRelTol(void)
NekDouble GetWaveForceMagStep(void)
void UpdateWaveForceMag(int n)
VWIIterationType GetVWIIterationType(void)
The above copyright notice and this permission notice shall be included.
@ eFixedWaveForcingWithSubIterationOnAlpha