ChuteRestartDemo.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string.h>
#include "Chute.h"

Classes

class  ChuteRestartDemo
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

This code tests if chute problems restart properly. As can be seen above, it is very similar to restarting any other Mercury driver.

50 {
51  logger.assert_always(argc > 1, "Please provide a restart file to this code. Usage: ./ChuteRestartDemo -r "
52  "\"ChuteDemo.restart\"");
53  bool isRestart = false;
54  for (unsigned int i = 0; i < argc; ++i)
55  {
56  if (!strcmp(argv[i], "-restart") || !strcmp(argv[i], "-r"))
57  {
58  isRestart = true;
59  }
60  }
61  logger.assert_always(isRestart, "Please provide a restart file to this code. Usage: ./ChuteRestartDemo -r "
62  "ChuteDemo.restart");
63  ChuteRestartDemo problem;
64  problem.solve(argc, argv);
65 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Definition: ChuteRestartDemo.cpp:35
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51

References constants::i, logger, and DPMBase::solve().