hstop_demo.cpp File Reference
#include "SilbertPeriodic.h"

Classes

class  SilbertHstop
 

Functions

bool PointIsAboveCurve (Mdouble h, Mdouble a, int study_num)
 
int HstopCurve (string cmd UNUSED, int study_num, Mdouble h, Mdouble hMax, Mdouble a)
 
int main (int argc UNUSED, char *argv[])
 

Variables

fstream ReportFile
 

Function Documentation

◆ HstopCurve()

int HstopCurve ( string cmd  UNUSED,
int  study_num,
Mdouble  h,
Mdouble  hMax,
Mdouble  a 
)
122 {
123  cout << "restart at study_num=" << study_num << ", h=" << h << ", a=" << a << endl;
124 
125  stringstream name;
126  name << "Report" << study_num;
127  ReportFile.open(name.str().c_str(),fstream::out | fstream::app);
128  //~ ReportFile << "height\tangle\tlambda\tmu\tabovemuBottom\tabove\n";
129  bool piac = PointIsAboveCurve(h,a,study_num);
130  ReportFile.close();
131 
132  //now increase height gradually; decrease angle if flow starts
133  if (h<hMax) {
134  if (piac) a-=.5;
135  else h+=2;
136  stringstream command;
137  // for msm1:
138  command << "echo " << study_num << " " << h << " " << hMax << " " << a << " > arg";
139  // for einder:
140  //command << "name="<<cmd<<" && cd ${name/hstop_StudyHeightHmaxAngle.exe/} && ~/clusterscriptexecute $name " << study_num << " " << h << " " << hMax << " " << a << "&";
141  cout << command.str() << endl;
142  return system (command.str().c_str());
143  } else {
144  return 0;
145  }
146 }
bool PointIsAboveCurve(Mdouble h, Mdouble a, int study_num)
Definition: hstop_demo.cpp:90
fstream ReportFile
Definition: hstop_demo.cpp:88
const Scalar * a
Definition: level2_cplx_impl.h:32
string name
Definition: plotDoE.py:33
std::ofstream out("Result.txt")

References a, plotDoE::name, out(), PointIsAboveCurve(), and ReportFile.

Referenced by main().

◆ main()

int main ( int argc  UNUSED,
char argv[] 
)
150 {
151  HstopCurve(argv[0],4,4.,60.,24.);
152 }
int HstopCurve(string cmd UNUSED, int study_num, Mdouble h, Mdouble hMax, Mdouble a)
Definition: hstop_demo.cpp:121

References HstopCurve().

◆ PointIsAboveCurve()

bool PointIsAboveCurve ( Mdouble  h,
Mdouble  a,
int  study_num 
)
90  {
91  cout << "PointIsAboveCurve(" << study_num << ", h=" << h << ", a=" << a << ")" << endl;
93  problem.setInflowHeight(h) ;
94  problem.setChuteAngle(a);
95  problem.set_study(study_num);
96  stringstream name;
97  name << "H" << problem.getInflowHeight()
98  << "A" << problem.getChuteAngleDegrees()
99  << "L" << round(100.*problem.getFixedParticleRadius()*2.)/100.
100  << "M" << problem.getSlidingFrictionCoefficient()
101  << "B" << problem.getSlidingFrictionCoefficientBottom();
102  problem.setName(name.str().c_str());
103  cout << "starting " << name.str().c_str() << endl;
104  // if you want more restart output, use these options
105  //problem.restartFile.setFileType(FileType::MULTIPLE_FILES_PADDED);
106  // for real runs:
107  //problem.solve();
108  // for test runs:
109  problem.solve_analytic();
110  stringstream com;
111  ReportFile << problem.getInflowHeight()
112  << "\t" << problem.getChuteAngleDegrees()
113  << "\t" << round(100.*problem.getFixedParticleRadius()*2.)/100.
114  << "\t" << problem.getSlidingFrictionCoefficient()
115  << "\t" << problem.getSlidingFrictionCoefficientBottom()
116  << "\t" << problem.pointIsAboveCurve
117  << endl;
118  return problem.pointIsAboveCurve;
119 }
Definition: hstop_StudyHeightHmaxAngle.cpp:12
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16 &a)
Definition: BFloat16.h:646
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References a, plotDoE::name, problem, ReportFile, and Eigen::bfloat16_impl::round().

Referenced by HstopCurve().

Variable Documentation

◆ ReportFile

fstream ReportFile

Referenced by HstopCurve(), and PointIsAboveCurve().