43int main(
int argc,
char *argv[])
68 Mvdir(
"Save", WaveForce);
72 Mvdir(
"Save_Outer", WaveForce);
80 catch (
const std::runtime_error &)
85 catch (
const std::string &eStr)
87 cout <<
"Error: " << eStr << endl;
94 string saveOuterIter =
"mv -f OuterIter.his " + dir;
95 if (system(saveOuterIter.c_str()))
97 ASSERTL0(
false, saveOuterIter.c_str());
101 string newdir = dir + boost::lexical_cast<std::string>(dir_ending);
102 string syscall =
"mv -f " + dir +
" " + newdir;
104 if (system(syscall.c_str()))
110 syscall =
"mkdir " + dir;
111 ASSERTL0(system(syscall.c_str()) == 0,
112 "Failed to make directory '" + dir +
"'");
127 bool exit_iteration =
false;
129 while (exit_iteration ==
false)
150 cout <<
"Failed to converge growth rate in"
151 <<
" inner iteration after " << vwi.
GetIterEnd()
158 if (exit_iteration ==
false)
165 cerr <<
"Failed to converge after "
168 exit_iteration =
true;
177 bool exit_iteration =
false;
190 while (exit_iteration ==
false)
211 cout <<
"Failed to converge growth rate in"
212 <<
" inner iteration after " << vwi.
GetIterEnd()
221 cout <<
"m_alpha[0] is " << vwi.
GetAlpha() << endl;
223 if (exit_iteration ==
false)
233 if ((exit_iteration ==
true) && (init_search == 1))
239 exit_iteration =
false;
244 cerr <<
"Failed to converge after "
247 exit_iteration =
true;
267 bool exit_iteration =
false;
269 while (exit_iteration ==
false)
271 bool exit_alphaIter =
false;
283 if (exit_alphaIter ==
false)
298 cout <<
"Failed to converge growth rate in"
299 <<
" inner iteration after " << vwi.
GetIterEnd()
304 vwi.
MoveFile(
"AlphaIter.his",
"Save_Outer", nouter_iter);
313 exit_iteration =
true;
318 cerr <<
"Failed to converge after "
321 exit_iteration =
true;
327 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)
@ eFixedWaveForcingWithSubIterationOnAlpha