// Use. void table_center (const GeometryRect& geo, const std::vector<double>& Density, Treelog& msg) { // Print it. const size_t column_size = geo.cell_columns (); const size_t row_size = geo.cell_rows (); std::ostringstream tmp; // Top line tmp << "z\\x"; for (size_t col = 0; col < column_size; col++) { daisy_assert (row_size > 0); tmp << "\t" << geo.cell_x (geo.cell_index (0, col)); } // Rows. for (size_t row = 0; row < row_size; row++) { daisy_assert (column_size > 0); tmp << "\n" << geo.cell_z (geo.cell_index (row, 0)); for (size_t col = 0; col < column_size; col++) { const size_t cell = geo.cell_index (row, col); daisy_assert (cell < Density.size ()); tmp << "\t" << Density[cell]; } } Treelog::Open nest (msg, "Root density table [(cm, cm) -> cm/cm^3]"); msg.message (tmp.str ()); }