aboutsummaryrefslogtreecommitdiff
path: root/MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/mycommand.h
blob: 68bb434ecc92fda16e7cb28b118760d75bc2aba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/// \file
/// Handle command line arguments.

#ifndef MYCOMMAND_H
#define MYCOMMAND_H

#include <stdio.h>

/// A structure to hold the value of every run-time parameter that can
/// be read from the command line.
typedef struct CommandSt
{
   char potDir[1024];  //!< the directory where EAM potentials reside
   char potName[1024]; //!< the name of the potential
   char potType[1024]; //!< the type of the potential (funcfl or setfl)
   int doeam;          //!< a flag to determine whether we're running EAM potentials
   int nx;             //!< number of unit cells in x
   int ny;             //!< number of unit cells in y
   int nz;             //!< number of unit cells in z
   int xproc;          //!< number of processors in x direction
   int yproc;          //!< number of processors in y direction
   int zproc;          //!< number of processors in z direction
   int nSteps;         //!< number of time steps to run
   int printRate;      //!< number of steps between output
   double dt;          //!< time step (in femtoseconds)
   double lat;         //!< lattice constant (in Angstroms)
   double temperature; //!< simulation initial temperature (in Kelvin)
   double initialDelta; //!< magnitude of initial displacement from lattice (in Angstroms)
} Command;

/// Process command line arguments into an easy to handle structure.
Command parseCommandLine(int argc, char** argv);

/// Print run parameters in yaml format on the supplied output stream.
void printCmdYaml(FILE* file, Command* cmd);

#endif