94 logger(
INFO,
"Execute 'source Chain.sh' to get coarse-grained statistics of the last time step");
95 helpers::writeToFile(
"Chain.sh",
"../MercuryCG/fstatistics Chain -stattype XZ -w 0.1 -h 0.05 -tmin 1 -tmax 30 -o Chain.XZ.stat\n"
96 "../MercuryCG/MercuryCG Chain -stattype Z -w 0.1 -h 0.05 -tmin 1 -tmax 30 -o Chain.Z.stat\n"
97 "../MercuryCG/MercuryCG Chain -stattype O -w 0.1 -h 0.05 -tmin 1 -tmax 30 -o Chain.O.stat\n");
99 logger(
INFO,
"Run 'Chain.m' in MATLAB/octave to visualise the statistical output");
101 "data = loadstatistics('Chain.XZ.stat');\n"
103 "contourf(data.x,data.z,data.Density,20,'EdgeColor','none')\n"
105 "c.Label.String = '\\rho';\n"
111 "particles=importdata('Chain.data',' ',12);\n"
112 "z=particles.data(:,3);\n"
113 "r=particles.data(:,7);\n"
114 "a=linspace(0,2*pi,40);\n"
115 "xCircle = sin(a);\n"
116 "zCircle = cos(a);\n"
118 "for i=1:length(x)\n"
119 " plot(x(i)+r(i)*xCircle,z(i)+r(i)*zCircle,'Color',.8*[1 1 1])\n"
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 setN(std::size_t n)
Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction.
Definition: BaseCG.cc:132
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
Evaluates time-resolved continuum fields and writes the data into a stat file.
Definition: CG.h:76
void setWidth(Mdouble width) override
Definition: CG.h:220
Definition: CGSelectRegionSelfTest.cpp:34
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1473
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:58