PeriodicInflow2D_Initiation.cpp File Reference

Classes

class  FlowRule
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
130 {
131  FlowRule problem;
132  problem.restartFile.setFileType(FileType::MULTIPLE_FILES);//restartFile.setFileType(FileType::MULTIPLE_FILES_PADDED);
133  problem.setSaveCount(1e4);
134  problem.restartFile.setSaveCount(100.0*problem.restartFile.getSaveCount());
135  problem.setTimeMax(2000);
136  //~ problem.setRoughBottomType(MONOLAYER_DISORDERED);
137 
138  //set case, height, angle to given or default values
139  vector<Mdouble> study_num;
140  study_num.resize(3);
141 
142  //this line is needed for the code to work with demoparams
143  //if (argc<4) exit(-1);
144 
145  if (argc>1) study_num[0]=atof(argv[1]);
146  else { study_num[0]=4; std::cout << "No study number given; using lambda=1" << std::endl;}
147  if (argc>2) study_num[1]=atof(argv[2]);
148  else { study_num[1]=5; std::cout << "No height given; using h=10 d" << std::endl;}
149  if (argc>3) study_num[2]=atof(argv[3]);
150  else { study_num[2]=28; std::cout << "No angle given; using theta=24 deg" << std::endl;}
151 
152  //call run
153  if (argc>3) problem.run(study_num,argc-3,argv+3);
154  else problem.run(study_num,1,argv);
155 }
@ MULTIPLE_FILES
each time-step will be written into/read from separate files numbered consecutively: name_....
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_.
Definition: File.cc:273
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
unsigned int getSaveCount() const
Gets File::saveCount_.
Definition: File.cc:255
Definition: PeriodicInflow2D_Initiation.cpp:30
void run(std::vector< Mdouble > study_num, int argc, char *argv[])
Definition: PeriodicInflow2D_Initiation.cpp:48

References File::getSaveCount(), MULTIPLE_FILES, DPMBase::restartFile, FlowRule::run(), File::setFileType(), DPMBase::setSaveCount(), File::setSaveCount(), and DPMBase::setTimeMax().