47 "Can not write grid load balancing for non-AMR runs.");
50 for (
int lev = 0; lev < nLevel; ++lev) {
51 std::stringstream tmp1;
52 tmp1 <<
"\"level-" << lev <<
"\"";
54 std::stringstream tmp2;
55 tmp2 <<
"Number of boxes at level " << lev;
61 std::stringstream tmp1;
62 tmp1 <<
"\"processor-" << p <<
"\"";
64 std::stringstream tmp2;
65 tmp2 <<
"Number of grid points per processor " << p;
70 if (
mode_m == std::ios::app )
75 std::string dateStr(simtimer.
date());
76 std::string timeStr(simtimer.
time());
79 ss <<
"Grid load balancing statistics '"
81 << dateStr <<
"" << timeStr;
96 "Can not write grid load balancing for non-AMR runs.");
98 std::map<int, long> gridPtsPerCore;
99 std::vector<int> gridsPerLevel;
116 for (
int lev = 0; lev < nLevel; ++lev) {
117 std::stringstream ss;
118 ss <<
"\"level-" << lev <<
"\"";
124 for (
int p = 0; p < nProcs; ++p) {
125 std::stringstream ss;
126 ss <<
"\"processor-" << p <<
"\"";
std::string getInputFn()
get opals input filename
static OpalData * getInstance()
virtual void getGridStatistics(std::map< int, long > &gridPtsPerCore, std::vector< int > &gridsPerLevel) const =0
const AmrObject * getAmrObject() const
void write(PartBunchBase< double, 3 > *beam)
GridLBalWriter(const std::string &fname, bool restart)
void fillHeader(const PartBunchBase< double, 3 > *beam)
void addColumn(const std::string &name, const std::string &type, const std::string &unit, const std::string &desc, std::ios_base::fmtflags flags=std::ios_base::scientific, unsigned short precision=15)
void addColumnValue(const std::string &name, const T &val)
std::string toString(const T &val)
void addDefaultParameters()
void addDescription(const std::string &text, const std::string &content)
void writeHeader()
Write SDDS header.
std::ios_base::openmode mode_m
First write to the statistics output file.
void addInfo(const std::string &mode, const size_t &no_row_counts)
The base class for all OPAL exceptions.
std::string date() const
Return date.
std::string time() const
Return time.