48 int main(
int argc,
char *argv[])
70 Mvdir(
"Save",WaveForce);
74 Mvdir(
"Save_Outer",WaveForce);
81 catch (
const std::runtime_error&)
86 catch (
const std::string& eStr)
88 cout <<
"Error: " << eStr << endl;
95 string saveOuterIter =
"mv -f OuterIter.his "+ dir;
96 if(system(saveOuterIter.c_str()))
98 ASSERTL0(
false,saveOuterIter.c_str());
102 string newdir = dir + boost::lexical_cast<std::string>(dir_ending);
103 string syscall =
"mv -f " + dir +
" " + newdir;
105 if(system(syscall.c_str()))
111 syscall =
"mkdir " + dir;
112 ASSERTL0(system(syscall.c_str()) == 0,
113 "Failed to make directory '" + dir +
"'");
128 bool exit_iteration =
false;
130 while(exit_iteration ==
false)
151 cout <<
"Failed to converge growth rate in" <<
159 if(exit_iteration ==
false)
167 exit_iteration =
true;
176 bool exit_iteration =
false;
190 while(exit_iteration ==
false)
211 cout <<
"Failed to converge growth rate in" <<
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;
245 exit_iteration =
true;
266 bool exit_iteration =
false;
268 while(exit_iteration ==
false)
270 bool exit_alphaIter =
false;
282 if(exit_alphaIter ==
false)
297 cout <<
"Failed to converge growth rate in" <<
303 vwi.
MoveFile(
"AlphaIter.his",
"Save_Outer", nouter_iter);
312 exit_iteration =
true;
319 exit_iteration =
true;
325 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