ProtectiveWall.cpp File Reference

Classes

class  protectiveWall
 [AT_PW:headers] More...
 

Functions

int main (int argc, char *argv[])
 [AT_PW:MainClass] More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

[AT_PW:MainClass]

[AT_PW:Mainfunction]

[AT_PW:setUp]

[AT_PW:setUp]

232 {
233  //Helper
234  logger(INFO,
235  "Write in the terminal after the compilation'./protectiveWall -Np 500 -r 0.01 -h 0.1 -w 0.25 -l 1.0 -s 15.0 -t "
236  "20.0' to run the program");
237 
239  int Nump = helpers::readFromCommandLine(argc, argv, "-Np", 50); //50 particles
240  Mdouble pRadius = helpers::readFromCommandLine(argc, argv, "-r", 0.01); //0.01 [m]
241  Mdouble height = helpers::readFromCommandLine(argc, argv, "-h", 0.1); //0.1 [m]
242  Mdouble width = helpers::readFromCommandLine(argc, argv, "-w", 0.25); //0.25 [m]
243  Mdouble length = helpers::readFromCommandLine(argc, argv, "-l", 1.0); //1.0 [m]
244  Mdouble slopeAngle = helpers::readFromCommandLine(argc, argv, "-s", 15.0); //15 grades
245 
246  protectiveWall problem(Nump, pRadius, height, width, length, slopeAngle); //Object
247 
248  Mdouble simTime = helpers::readFromCommandLine(argc, argv, "-t", 5.0); // 5.0 [s]
249  problem.setTimeMax(simTime);
250  std::string simName = helpers::readFromCommandLine(argc,argv,"-name",std::string("protectiveWall"));
251  problem.setName(simName);
253 
254  problem.setSaveCount(400);
255  problem.setTimeStep(0.005 / 50.0); // (collision time)/50.0
256  problem.removeOldFiles();
257  problem.solve();
258  return 0;
259 }
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
[AT_PW:headers]
Definition: ProtectiveWall.cpp:40
bool readFromCommandLine(int argc, char *argv[], std::string varName)
Returns true if command line arguments contain varName, false else.
Definition: CommandLineHelpers.cc:103

References INFO, logger, helpers::readFromCommandLine(), DPMBase::removeOldFiles(), DPMBase::setName(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), and DPMBase::solve().