LeesEdwardsSelfTest.cpp File Reference

Classes

class  LeesEdwardsSelfTest
 [Lees:headers] More...
 

Functions

int main ()
 [Lees:class] More...
 

Function Documentation

◆ main()

int main ( )

[Lees:class]

107 {
108  //instantiate the class
109  LeesEdwardsSelfTest problem;
110  //set output and time stepping properties
111  problem.setXBallsAdditionalArguments("-w0 -v0 -solidf -cmode 5");
112  //solve
113  problem.solve();
114 
115  logger(INFO,"Execute 'source LeesEdwardsSelfTest.sh' to get coarse-grained statistics");
116  helpers::writeToFile("LeesEdwardsSelfTest.sh","../MercuryCG/fstatistics LeesEdwardsSelfTest -stattype XY -w 0.25 -h 0.25 -tmin 2\n"
117  "../MercuryCG/fstatistics LeesEdwardsSelfTest -stattype Y -w 0.25 -h 0.1 -tmin 2 -o LeesEdwardsSelfTest.Y.stat");
118 
119  logger(INFO,"Run 'LeesEdwardsSelfTest.m' in MATLAB/octave to visualise the statistical output");
120  helpers::writeToFile("LeesEdwardsSelfTest.m","%% 2D velocity field v_x(x,y)\n"
121  "addpath('../MercuryCG/')\n"
122  "data = loadstatistics('LeesEdwardsSelfTest.stat');\n"
123  "colormap(jet)\n"
124  "contourf(data.x,data.y,data.VelocityX,20,'EdgeColor','none')\n"
125  "c = colorbar\n"
126  "c.Label.String = '\\rho';\n"
127  "title('Velocity')\n"
128  "xlabel('x')\n"
129  "ylabel('z');\n"
130  "axis equal\n"
131  "%% 1D velocity field v_x(y)\n"
132  "dataY = loadstatistics('LeesEdwardsSelfTest.Y.stat');\n"
133  "plot(dataY.y,dataY.VelocityX)\n"
134  "xlabel('y')\n"
135  "ylabel('v_x');\n"
136  "axis equal");
137 
138  return 0;
139 }
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.
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
[Lees:headers]
Definition: LeesEdwardsSelfTest.cpp:34
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:58

References INFO, logger, DPMBase::setXBallsAdditionalArguments(), DPMBase::solve(), and helpers::writeToFile().