LeesEdwardsSelfTest.cpp File Reference

Classes

class  LeesEdwardsSelfTest
 [Lees:headers] More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

[Lees:class] [Lees:main]

86 {
87  //instantiate the class
89  //set output and time stepping properties
90  problem.setXBallsAdditionalArguments("-w0 -v0 -solidf -cmode 5");
91  //solve
92  problem.solve(argc, argv);
93 
94  logger(INFO,"Execute 'source LeesEdwardsSelfTest.sh' to get coarse-grained statistics");
95  helpers::writeToFile("LeesEdwardsSelfTest.sh","../MercuryCG/fstatistics LeesEdwardsSelfTest -stattype XY -w 0.25 -h 0.25 -tmin 2\n"
96  "../MercuryCG/fstatistics LeesEdwardsSelfTest -stattype Y -w 0.25 -h 0.1 -tmin 2 -o LeesEdwardsSelfTest.Y.stat");
97 
98  logger(INFO,"Run 'LeesEdwardsSelfTest.m' in MATLAB/octave to visualise the statistical output");
99  helpers::writeToFile("LeesEdwardsSelfTest.m","%% 2D velocity field v_x(x,y)\n"
100  "addpath('../MercuryCG/')\n"
101  "data = loadstatistics('LeesEdwardsSelfTest.stat');\n"
102  "colormap(jet)\n"
103  "contourf(data.x,data.y,data.VelocityX,20,'EdgeColor','none')\n"
104  "c = colorbar\n"
105  "c.Label.String = '\\rho';\n"
106  "title('Velocity')\n"
107  "xlabel('x')\n"
108  "ylabel('z');\n"
109  "axis equal\n"
110  "%% 1D velocity field v_x(y)\n"
111  "dataY = loadstatistics('LeesEdwardsSelfTest.Y.stat');\n"
112  "plot(dataY.y,dataY.VelocityX)\n"
113  "xlabel('y')\n"
114  "ylabel('v_x');\n"
115  "axis equal");
116 
117  return 0;
118 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
[Lees:headers]
Definition: LeesEdwardsSelfTest.cpp:13
#define INFO(i)
Definition: mumps_solver.h:54
bool writeToFile(const std::string &filename, const std::string &filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:29
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References INFO, logger, problem, and helpers::writeToFile().