chute_periodic_autorun.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <sys/types.h>
#include <sys/stat.h>
#include <Boundaries/PeriodicBoundary.h>
#include <Species/LinearViscoelasticFrictionSpecies.h>
#include "Chute.h"

Classes

class  ChutePeriodic
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
142 {
143  ChutePeriodic problem;
144  problem.setup();
145  logger.assert_always(argc > 1, "Argument needed!");
146  problem.setChuteAngle(atof(argv[1]));
147  logger(INFO, "Chute Angle: %", problem.getChuteAngle());
148  problem.setZMax(5e-3);
149  problem.solve();
150  problem.write(std::cout, false);
151  problem.writeRestartFile();
152 
153  ChutePeriodic problem2;
154  problem2.setup();
155  logger.assert_always(argc > 1, "Argument needed!");
156  problem2.setChuteAngle(atof(argv[1]));
157 
158  logger(INFO, "Chute Angle: %", problem2.getChuteAngle());
159  problem2.setZMax(10e-3);
160  problem2.solve();
161  problem2.write(std::cout, false);
162  problem2.writeRestartFile();
163 
164  ChutePeriodic problem3;
165  problem3.setup();
166  logger.assert_always(argc > 1, "Argument needed!");
167  problem3.setChuteAngle(atof(argv[1]));
168  logger(INFO, "Chute Angle: %", problem3.getChuteAngle());
169  problem3.setZMax(15e-3);
170  problem3.solve();
171  problem3.write(std::cout, false);
172  problem3.writeRestartFile();
173 
174  ChutePeriodic problem4;
175  problem4.setup();
176  logger.assert_always(argc > 1, "Argument needed!");
177  problem4.setChuteAngle(atof(argv[1]));
178  logger(INFO, "Chute Angle: %" , problem4.getChuteAngle());
179  problem4.setZMax(20e-3);
180  problem4.solve();
181  problem4.write(std::cout, false);
182  problem4.writeRestartFile();
183 
184  ChutePeriodic problem5;
185  problem5.setup();
186  logger.assert_always(argc > 1, "Argument needed!");
187  problem5.setChuteAngle(atof(argv[1]));
188  logger(INFO, "Chute Angle: %", problem5.getChuteAngle());
189  problem5.setZMax(25e-3);
190  problem5.solve();
191  problem5.write(std::cout, false);
192  problem5.writeRestartFile();
193 }
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.
Definition: chute_periodic_autorun.cpp:37
void setup()
Definition: chute_periodic_autorun.cpp:100
void write(std::ostream &os, bool writeAllParticles=true) const override
This function writes the Chute properties to an ostream, and adds the properties of ALL chute particl...
Definition: Chute.cc:206
void setChuteAngle(Mdouble chuteAngle)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:768
Mdouble getChuteAngle() const
Returns the chute angle (in radians)
Definition: Chute.cc:807
virtual void writeRestartFile()
Stores all the particle data for current save time step to a "restart" file, which is a file simply i...
Definition: DPMBase.cc:2942
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1217
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270

References Chute::getChuteAngle(), INFO, logger, Chute::setChuteAngle(), ChutePeriodic::setup(), DPMBase::setZMax(), DPMBase::solve(), Chute::write(), and DPMBase::writeRestartFile().