vibratedBed.cpp File Reference
#include <iomanip>
#include "SilbertPeriodic.h"

Classes

class  vibratedBed
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
102 {
103  vibratedBed problem;
104  //set case, height, angle to given or default values
105  std::vector<Mdouble> studyNumber;
106  studyNumber.resize(3);
107  const unsigned int numArgs = 5;
108 
109  if (argc>numArgs)
110  {
111  studyNumber[0]=atof(argv[1]);
112  studyNumber[1]=atof(argv[2]);
113  studyNumber[2]=atof(argv[3]);
114  problem.setAmplitude(atof(argv[4]));
115  problem.setFrequency(atof(argv[5]));
116  problem.setTimeStep(problem.getTimeStep()*2.0);
117  problem.setSaveCount(50.0/problem.getTimeStep());
118  problem.eneFile.setSaveCount(0.5/problem.getTimeStep());
119  problem.setTimeMax(2000.0);
122  problem.run(studyNumber,argc-numArgs,argv+numArgs);
123  }
124  else
125  {
126  logger(ERROR, "Not enough input arguments given (./vibratedBed $study $height $angle $amplitude $frequency);\n"
127  "using demo values (equivalent to ./vibratedBed 4 5 10 0.02 1 -tmax 1000 -dt 0.001)");
128  studyNumber[0] = 4;
129  studyNumber[1] = 0.1;
130  studyNumber[2] = 10;
131  problem.setAmplitude(0.01);
132  problem.setFrequency(1.0);
134 
135  problem.setTimeStep(problem.getTimeStep() * 10.0);
136  problem.setTimeMax(2.0);
137  problem.setSaveCount(1e1);
138  problem.eneFile.setSaveCount(1e2);
140  problem.run(studyNumber, 1, argv);
141  }
142 }
@ MONOLAYER_DISORDERED
Definition: Chute.h:53
@ MULTIPLE_FILES_PADDED
each time-step will be written into/read from separate files numbered consecutively,...
@ ONE_FILE
all data will be written into/ read from a single file called name_
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
void setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
Definition: Chute.cc:714
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1488
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1250
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1478
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
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
Definition: vibratedBed.cpp:30
void setFrequency(Mdouble frequency)
Definition: vibratedBed.cpp:74
void run(std::vector< Mdouble > studyNumber, int argc, char *argv[])
Definition: vibratedBed.cpp:40
void setAmplitude(Mdouble amplitude)
Definition: vibratedBed.cpp:79

References DPMBase::dataFile, DPMBase::eneFile, ERROR, DPMBase::getTimeStep(), logger, MONOLAYER_DISORDERED, MULTIPLE_FILES_PADDED, ONE_FILE, DPMBase::restartFile, vibratedBed::run(), vibratedBed::setAmplitude(), File::setFileType(), vibratedBed::setFrequency(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), File::setSaveCount(), DPMBase::setTimeMax(), and DPMBase::setTimeStep().