| Base 583127 | Head #33194 2f6aab | ||||
|---|---|---|---|---|---|
| Total | Total | +/- | New | ||
| Rate | 85.99% | 85.99% | +0.00% | 100.00% | |
| Hits | 136176 | 136193 | +17 | 21 | |
| Misses | 22186 | 22188 | +2 | 0 | |
| Filename | Stmts | Miss | Cover |
|---|---|---|---|
| framework/include/utils/FormattedTable.h | +3 | 0 | +0.27% |
| framework/src/outputs/CSV.C | +7 | 0 | +0.06% |
| framework/src/utils/FormattedTable.C | +9 | +2 | -0.38% |
| TOTAL | +19 | +2 | +0.00% |
codecodecode+
224 225 226 227 + 228 229 + 230 + 231 232 233 |
/** * Set whether printCSV uses scientific notation for floating point values. */ void setUseScientificNotation(bool use_scientific_notation) { _csv_use_scientific_notation = use_scientific_notation; } /** * Sorts columns alphabetically. |
35 36 37 38 + 39 + 40 41 42 |
"Align the outputted csv data by padding the numbers with trailing whitespace"); params.addParam<std::string>("delimiter", ",", "Assign the delimiter (default is ','"); params.addParam<unsigned int>("precision", 14, "Set the output precision"); params.addParam<bool>( "scientific_notation", false, "Output floating point values in scientific notation."); params.addParam<bool>("create_final_symlink", false, "Enable/disable the creation of a _FINAL symlink for vector postprocessor " |
46 47 48 49 + 50 51 52 |
false, "Enable/disable the creation of a _LATEST symlink for vector postprocessor data."); params.addParamNamesToGroup("sort_columns align delimiter precision scientific_notation", "Table formatting"); params.addParamNamesToGroup("create_latest_symlink create_final_symlink", "Symbolic links"); // Suppress unused parameters |
60 61 62 63 + 64 65 66 |
: TableOutput(parameters), _align(getParam<bool>("align")), _precision(getParam<unsigned int>("precision")), _scientific_notation(getParam<bool>("scientific_notation")), _delimiter(getParam<std::string>("delimiter")), _write_all_table(false), _write_vector_table(false), |
82 83 84 85 + 86 87 88 |
// Set the precision _all_data_table.setPrecision(_precision); _all_data_table.setUseScientificNotation(_scientific_notation); if (_recovering) _all_data_table.append(true); |
223 224 225 226 + 227 228 229 |
const auto & vpp_name = it.first; it.second.setDelimiter(_delimiter); it.second.setPrecision(_precision); it.second.setUseScientificNotation(_scientific_notation); if (_sort_columns) it.second.sortColumns(); |
260 261 262 263 + 264 + 265 266 267 |
if (_time_data) { _vector_postprocessor_time_tables[vpp_name].setUseScientificNotation( _scientific_notation); _vector_postprocessor_time_tables[vpp_name].printCSV(fprefix + "_time.csv"); } } |
146 147 148 149 + 150 + 151 152 153 |
_append(false), _output_time(true), _csv_delimiter(DEFAULT_CSV_DELIMITER), _csv_precision(DEFAULT_CSV_PRECISION), _csv_use_scientific_notation(false) { } |
160 161 162 163 + 164 165 166 |
_output_time(o._output_time), _csv_delimiter(o._csv_delimiter), _csv_precision(o._csv_precision), _csv_use_scientific_notation(o._csv_use_scientific_notation), _column_names_unsorted(o._column_names_unsorted) { if (_output_file.is_open()) |
376 377 378 379 + 380 + 381 382 383 |
// Update the time _align_width { std::ostringstream oss; if (_csv_use_scientific_notation) oss << std::scientific; oss << std::setprecision(_csv_precision) << it.first; unsigned int w = oss.str().size(); _align_widths["time"] = std::max(_align_widths["time"], w); |
387 388 389 390 + 391 + 392 393 394 |
for (const auto & jt : it.second) { std::ostringstream oss; if (_csv_use_scientific_notation) oss << std::scientific; oss << std::setprecision(_csv_precision) << *jt.second; unsigned int w = oss.str().size(); _align_widths[jt.first] = std::max(_align_widths[jt.first], w); |
438 439 440 441 + 442 + 443 444 + 445 446 447 |
{ bool first = true; if (_csv_use_scientific_notation) _output_file << std::scientific; else _output_file << std::defaultfloat; if (_output_time) { |