solver.solve(system_matrix, solution, system_rhs, preconditioner);
std::cout << " Number of CG iterations: " << solver_control.last_step()
- << "\n"
+ << '\n'
<< std::endl;
constraints.distribute(solution);
}
{
std::cout << "**** Error: No input file provided!\n"
<< "**** Error: Call this program as './step-50 input.prm\n"
- << "\n"
+ << '\n'
<< "**** You may want to use one of the input files in this\n"
<< "**** directory, or use the following default values\n"
<< "**** to create an input file:\n";
const SymmetricTensor<2, dim> sigma =
Physics::Transformations::Piola::push_forward(
material_hand_calculated.get_S(), F);
- stream << time.get_current_time() << ";" << h[2] << ";" << b[2]
- << ";" << F[1][2] * 100.0 << ";" << sigma[1][2] << "\n";
+ stream << time.get_current_time() << ';' << h[2] << ';' << b[2]
+ << ';' << F[1][2] * 100.0 << ';' << sigma[1][2] << '\n';
}
}
{
/* Write one side at z = 0. */
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << -1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << -1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(0)[0] << " "
- << cell->vertex(0)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(0)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(2)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(1)[1] << " " << 0.000000e+00 << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << -1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << -1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(1)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(2)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(3)[0] << " "
- << cell->vertex(3)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(3)[1] << " " << 0.000000e+00 << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
/* Write one side at z = height. */
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << 1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << 1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(0)[0] << " "
- << cell->vertex(0)[1] << " " << height << "\n";
+ << cell->vertex(0)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << height << "\n";
+ << cell->vertex(1)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << height << "\n";
+ << cell->vertex(2)[1] << " " << height << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << 1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << 1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << height << "\n";
+ << cell->vertex(1)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(3)[0] << " "
- << cell->vertex(3)[1] << " " << height << "\n";
+ << cell->vertex(3)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << height << "\n";
+ << cell->vertex(2)[1] << " " << height << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
}
{
/* Write one side at z = 0. */
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << -1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << -1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(0)[0] << " "
- << cell->vertex(0)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(0)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(1)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(2)[1] << " " << 0.000000e+00 << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << -1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << -1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(1)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(3)[0] << " "
- << cell->vertex(3)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(3)[1] << " " << 0.000000e+00 << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << 0.000000e+00 << "\n";
+ << cell->vertex(2)[1] << " " << 0.000000e+00 << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
/* Write one side at z = height. */
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << 1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << 1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(0)[0] << " "
- << cell->vertex(0)[1] << " " << height << "\n";
+ << cell->vertex(0)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << height << "\n";
+ << cell->vertex(2)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << height << "\n";
+ << cell->vertex(1)[1] << " " << height << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
stlfile << " facet normal " << 0.000000e+00 << " "
- << 0.000000e+00 << " " << 1.000000e+00 << "\n";
+ << 0.000000e+00 << " " << 1.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << cell->vertex(1)[0] << " "
- << cell->vertex(1)[1] << " " << height << "\n";
+ << cell->vertex(1)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(2)[0] << " "
- << cell->vertex(2)[1] << " " << height << "\n";
+ << cell->vertex(2)[1] << " " << height << '\n';
stlfile << " vertex " << cell->vertex(3)[0] << " "
- << cell->vertex(3)[1] << " " << height << "\n";
+ << cell->vertex(3)[1] << " " << height << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
}
stlfile << " facet normal "
<< normal_vector[0] / normal_norm << " "
<< normal_vector[1] / normal_norm << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << face->vertex(0)[0]
<< " " << face->vertex(0)[1] << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " vertex " << face->vertex(0)[0]
<< " " << face->vertex(0)[1] << " " << height
- << "\n";
+ << '\n';
stlfile << " vertex " << face->vertex(1)[0]
<< " " << face->vertex(1)[1] << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
stlfile << " facet normal "
<< normal_vector[0] / normal_norm << " "
<< normal_vector[1] / normal_norm << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << face->vertex(0)[0]
<< " " << face->vertex(0)[1] << " " << height
- << "\n";
+ << '\n';
stlfile << " vertex " << face->vertex(1)[0]
<< " " << face->vertex(1)[1] << " " << height
- << "\n";
+ << '\n';
stlfile << " vertex " << face->vertex(1)[0]
<< " " << face->vertex(1)[1] << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
}
stlfile << " facet normal "
<< normal_vector[0] / normal_norm << " "
<< normal_vector[1] / normal_norm << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << face->vertex(0)[0]
<< " " << face->vertex(0)[1] << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " vertex " << face->vertex(1)[0]
<< " " << face->vertex(1)[1] << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " vertex " << face->vertex(0)[0]
<< " " << face->vertex(0)[1] << " " << height
- << "\n";
+ << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
stlfile << " facet normal "
<< normal_vector[0] / normal_norm << " "
<< normal_vector[1] / normal_norm << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " outer loop\n";
stlfile << " vertex " << face->vertex(0)[0]
<< " " << face->vertex(0)[1] << " " << height
- << "\n";
+ << '\n';
stlfile << " vertex " << face->vertex(1)[0]
<< " " << face->vertex(1)[1] << " "
- << 0.000000e+00 << "\n";
+ << 0.000000e+00 << '\n';
stlfile << " vertex " << face->vertex(1)[0]
<< " " << face->vertex(1)[1] << " " << height
- << "\n";
+ << '\n';
stlfile << " endloop\n";
stlfile << " endfacet\n";
}
const SymEngine::RCP<const SymEngine::Basic> &cse_expr =
intermediate_symbols_exprs[i].second;
stream << " " << i << ": " << cse_symbol << " = " << cse_expr
- << "\n";
+ << '\n';
}
stream << " Final reduced expressions for dependent variables: \n";
for (unsigned i = 0; i < reduced_exprs.size(); ++i)
- stream << " " << i << ": " << reduced_exprs[i] << "\n";
+ stream << " " << i << ": " << reduced_exprs[i] << '\n';
stream << std::flush;
}
{
stream << "Independent variables: \n";
for (unsigned i = 0; i < independent_symbols.size(); ++i)
- stream << " " << i << ": " << independent_symbols[i] << "\n";
+ stream << " " << i << ": " << independent_symbols[i] << '\n';
stream << std::flush;
}
{
stream << "Dependent variables: \n";
for (unsigned i = 0; i < dependent_functions.size(); ++i)
- stream << " " << i << dependent_functions[i] << "\n";
+ stream << " " << i << dependent_functions[i] << '\n';
stream << std::flush;
}
const bool /*print_cse*/) const
{
// Settings
- stream << "Method? " << optimization_method() << "\n";
- stream << "Flags: " << optimization_flags() << "\n";
- stream << "Optimized? " << (optimized() ? "Yes" : "No") << "\n";
+ stream << "Method? " << optimization_method() << '\n';
+ stream << "Flags: " << optimization_flags() << '\n';
+ stream << "Optimized? " << (optimized() ? "Yes" : "No") << '\n';
stream << "Values substituted? " << values_substituted() << "\n\n";
// Independent variables
stream << "Symbols (" << n_independent_variables()
- << " independent variables):"
- << "\n";
+ << " independent variables):" << '\n';
int cntr = 0;
for (SD::types::substitution_map::const_iterator it =
independent_variables_symbols.begin();
it != independent_variables_symbols.end();
++it, ++cntr)
{
- stream << cntr << ": " << it->first << "\n";
+ stream << cntr << ": " << it->first << '\n';
}
- stream << "\n" << std::flush;
+ stream << '\n' << std::flush;
// Dependent functions
stream << "Functions (" << n_dependent_variables()
- << " dependent variables):"
- << "\n";
+ << " dependent variables):" << '\n';
cntr = 0;
for (typename SD::types::symbol_vector::const_iterator it =
dependent_variables_functions.begin();
it != dependent_variables_functions.end();
++it, ++cntr)
{
- stream << cntr << ": " << (*it) << "\n";
+ stream << cntr << ": " << (*it) << '\n';
}
- stream << "\n" << std::flush;
+ stream << '\n' << std::flush;
// Common subexpression
if (optimized() == true && use_symbolic_CSE() == true)
print_dependent_functions,
print_cse_reductions);
- stream << "\n" << std::flush;
+ stream << '\n' << std::flush;
}
else if (optimization_method() == OptimizerType::lambda)
{
if (values_substituted())
{
- stream << "Evaluated functions:"
- << "\n";
+ stream << "Evaluated functions:" << '\n';
stream << std::flush;
cntr = 0;
for (typename std::vector<ReturnType>::const_iterator it =
it != dependent_variables_output.end();
++it, ++cntr)
{
- stream << cntr << ": " << (*it) << "\n";
+ stream << cntr << ": " << (*it) << '\n';
}
- stream << "\n" << std::flush;
+ stream << '\n' << std::flush;
}
}
const SD::types::substitution_map &symbol_value_map)
{
for (const auto &entry : symbol_value_map)
- stream << entry.first << " = " << entry.second << "\n";
+ stream << entry.first << " = " << entry.second << '\n';
stream << std::flush;
return stream;
{
for (const std::pair<size_type, number> &entry : line.entries)
out << " " << line.index << " " << entry.first << ": "
- << entry.second << "\n";
+ << entry.second << '\n';
// print out inhomogeneity.
if (line.inhomogeneity != number(0.))
- out << " " << line.index << ": " << line.inhomogeneity << "\n";
+ out << " " << line.index << ": " << line.inhomogeneity << '\n';
}
else
// but also output something if the constraint simply reads
// combination of other dofs
{
if (line.inhomogeneity != number(0.))
- out << " " << line.index << " = " << line.inhomogeneity << "\n";
+ out << " " << line.index << " = " << line.inhomogeneity << '\n';
else
out << " " << line.index << " = 0\n";
}
if (lines[i].entries.size() > 0)
for (size_type j = 0; j < lines[i].entries.size(); ++j)
out << " " << lines[i].index << "->" << lines[i].entries[j].first
- << "; // weight: " << lines[i].entries[j].second << "\n";
+ << "; // weight: " << lines[i].entries[j].second << '\n';
else
- out << " " << lines[i].index << "\n";
+ out << " " << lines[i].index << '\n';
}
out << "}" << std::endl;
}
{
out
<< "# This file was generated by the deal.II library." << '\n'
- << "# Date = " << Utilities::System::get_date() << "\n"
- << "# Time = " << Utilities::System::get_time() << "\n"
+ << "# Date = " << Utilities::System::get_date() << '\n'
+ << "# Time = " << Utilities::System::get_time() << '\n'
<< "#" << '\n'
<< "# For a description of the UCD format see the AVS Developer's guide."
<< '\n'
(flags.time != std::numeric_limits<double>::min() ? 1 : 0));
if (n_metadata > 0)
{
- out << "FIELD FieldData " << n_metadata << "\n";
+ out << "FIELD FieldData " << n_metadata << '\n';
if (flags.cycle != std::numeric_limits<unsigned int>::min())
{
- out << "CYCLE 1 1 int\n" << flags.cycle << "\n";
+ out << "CYCLE 1 1 int\n" << flags.cycle << '\n';
}
if (flags.time != std::numeric_limits<double>::min())
{
- out << "TIME 1 1 double\n" << flags.time << "\n";
+ out << "TIME 1 1 double\n" << flags.time << '\n';
}
}
}
}
vtu_out << offsets;
- out << "\n";
+ out << '\n';
out << " </DataArray>\n";
// next output the types of the cells. since all cells are the same, this is
// this should compress well :-)
vtu_out << cell_types;
- out << "\n";
+ out << '\n';
out << " </DataArray>\n";
out << " </Cells>\n";
} // loop over nodes
vtu_out << data;
- out << "\n";
+ out << '\n';
out << " </DataArray>\n";
} // loop over ranges
std::vector<float> data(data_vectors[data_set].begin(),
data_vectors[data_set].end());
vtu_out << data;
- out << "\n";
+ out << '\n';
out << " </DataArray>\n";
}
<< " " << (attribute_dim.second > 1 ? 3 : 1)
<< "\" NumberType=\"Float\" Precision=\"8\" Format=\"HDF\">\n";
ss << indent(indent_level + 3) << h5_sol_filename << ":/"
- << attribute_dim.first << "\n";
+ << attribute_dim.first << '\n';
ss << indent(indent_level + 2) << "</DataItem>\n";
ss << indent(indent_level + 1) << "</Attribute>\n";
}
out_stream << "\n\n+---------------------------------------------"
<< extra_dash << "+"
<< "------------+------------+"
- << "------------+------------+"
- << "\n"
+ << "------------+------------+" << '\n'
<< "| Total CPU/wall time elapsed since start "
<< extra_space << "|" << std::setw(10) << std::setprecision(3)
<< std::right << total_cpu_time << "s | |"
const std::string time_rank_space = " |";
// now generate a nice table
- out_stream << "\n"
+ out_stream << '\n'
<< "+------------------------------" << extra_dash << "+"
<< time_rank_column
<< (n_ranks > 1 && quantile > 0. ? time_rank_column : "")
<< "------------+"
<< (n_ranks > 1 && quantile > 0. ? time_rank_column : "")
- << time_rank_column << "\n"
+ << time_rank_column << '\n'
<< "| Total wallclock time elapsed " << extra_space << "|";
print_statistics(timer_all.wall_time());
<< (n_ranks > 1 && quantile > 0. ? time_rank_space : "")
<< " "
<< (n_ranks > 1 && quantile > 0. ? time_rank_space : "")
- << time_rank_space << "\n";
+ << time_rank_space << '\n';
out_stream << "| Section " << extra_space << "| no. calls "
<< "| min time rank |";
if (n_ranks > 1 && quantile > 0.)
<< (n_ranks > 1 && quantile > 0. ? time_rank_column : "")
<< "------------+"
<< (n_ranks > 1 && quantile > 0. ? time_rank_column : "")
- << time_rank_column << "\n";
+ << time_rank_column << '\n';
for (const auto &i : sections)
{
std::string name_out = i.first;
<< (n_ranks > 1 && quantile > 0. ? time_rank_column : "")
<< "------------+"
<< (n_ranks > 1 && quantile > 0. ? time_rank_column : "")
- << time_rank_column << "\n";
+ << time_rank_column << '\n';
}
}
stream << tape_index << "->" << status_tape
<< (i < (registered_tape_indices.size() - 1) ? "," : "");
}
- stream << "\n";
+ stream << '\n';
- stream << "Keep values? " << keep_independent_values() << "\n";
+ stream << "Keep values? " << keep_independent_values() << '\n';
stream << "Use stored tape buffer sizes? "
- << use_stored_taped_buffer_sizes << "\n";
+ << use_stored_taped_buffer_sizes << '\n';
}
::tapestats(tape_index, counts.data());
Assert(counts.size() >= 18, ExcInternalError());
stream
- << "Tape index: " << tape_index << "\n"
- << "Number of independent variables: " << counts[0] << "\n"
- << "Number of dependent variables: " << counts[1] << "\n"
- << "Max number of live, active variables: " << counts[2] << "\n"
- << "Size of taylor stack (number of overwrites): " << counts[3] << "\n"
- << "Operations buffer size: " << counts[4] << "\n"
- << "Total number of recorded operations: " << counts[5] << "\n"
- << "Operations file written or not: " << counts[6] << "\n"
- << "Overall number of locations: " << counts[7] << "\n"
- << "Locations file written or not: " << counts[8] << "\n"
- << "Overall number of values: " << counts[9] << "\n"
- << "Values file written or not: " << counts[10] << "\n"
- << "Locations buffer size: " << counts[11] << "\n"
- << "Values buffer size: " << counts[12] << "\n"
- << "Taylor buffer size: " << counts[13] << "\n"
- << "Number of eq_*_prod for sparsity pattern: " << counts[14] << "\n"
+ << "Tape index: " << tape_index << '\n'
+ << "Number of independent variables: " << counts[0] << '\n'
+ << "Number of dependent variables: " << counts[1] << '\n'
+ << "Max number of live, active variables: " << counts[2] << '\n'
+ << "Size of taylor stack (number of overwrites): " << counts[3] << '\n'
+ << "Operations buffer size: " << counts[4] << '\n'
+ << "Total number of recorded operations: " << counts[5] << '\n'
+ << "Operations file written or not: " << counts[6] << '\n'
+ << "Overall number of locations: " << counts[7] << '\n'
+ << "Locations file written or not: " << counts[8] << '\n'
+ << "Overall number of values: " << counts[9] << '\n'
+ << "Values file written or not: " << counts[10] << '\n'
+ << "Locations buffer size: " << counts[11] << '\n'
+ << "Values buffer size: " << counts[12] << '\n'
+ << "Taylor buffer size: " << counts[13] << '\n'
+ << "Number of eq_*_prod for sparsity pattern: " << counts[14] << '\n'
<< "Use of 'min_op', deferred to 'abs_op' for piecewise calculations: "
- << counts[15] << "\n"
+ << counts[15] << '\n'
<< "Number of 'abs' calls that can switch branch: " << counts[16]
- << "\n"
+ << '\n'
<< "Number of parameters (doubles) interchangeable without retaping: "
- << counts[17] << "\n"
+ << counts[17] << '\n'
<< std::flush;
}
// Set stream to print booleans as "true"/"false"
stream.setf(std::ios_base::boolalpha);
- stream << "Active tape index: " << active_tape_index() << "\n";
- stream << "Recording? " << is_recording() << "\n";
+ stream << "Active tape index: " << active_tape_index() << '\n';
+ stream << "Recording? " << is_recording() << '\n';
stream << std::flush;
if (AD::is_taped_ad_number<ad_type>::value)
taped_driver.print(stream);
- stream << "Registered independent variables: "
- << "\n";
+ stream << "Registered independent variables: " << '\n';
for (unsigned int i = 0; i < n_independent_variables(); ++i)
stream << registered_independent_variable_values[i]
<< (i < (n_independent_variables() - 1) ? "," : "");
stream << std::endl;
- stream << "Independent variable values: "
- << "\n";
+ stream << "Independent variable values: " << '\n';
print_values(stream);
- stream << "Registered marked independent variables: "
- << "\n";
+ stream << "Registered marked independent variables: " << '\n';
for (unsigned int i = 0; i < n_independent_variables(); ++i)
stream << registered_marked_independent_variables[i]
<< (i < (n_independent_variables() - 1) ? "," : "")
<< std::flush;
stream << std::endl;
- stream << "Dependent variable values: "
- << "\n";
+ stream << "Dependent variable values: " << '\n';
for (unsigned int i = 0; i < n_dependent_variables(); ++i)
stream << dependent_variables[i]
<< (i < (n_dependent_variables() - 1) ? "," : "");
stream << std::endl;
- stream << "Registered dependent variables: "
- << "\n";
+ stream << "Registered dependent variables: " << '\n';
for (unsigned int i = 0; i < n_dependent_variables(); ++i)
stream << registered_marked_dependent_variables[i]
<< (i < (n_dependent_variables() - 1) ? "," : "");
<< "\n#"
<< "\n# Note: This file is understood by MathGL v2.1 and higher only, and can "
<< "\n# be quickly viewed in a graphical environment using \'mglview\'. "
- << "\n#"
- << "\n";
+ << "\n#" << '\n';
}
// define a helper to keep loops approximately dim-independent
// (ii) write preamble and graphing tweaks
out << "\n#"
<< "\n# Preamble."
- << "\n#"
- << "\n";
+ << "\n#" << '\n';
if (mathgl_flags.draw_bounding_box)
out << "\nbox";
default:
Assert(false, ExcNotImplemented());
}
- out << "\n";
+ out << '\n';
// (iii) write vertex ordering
out << "\n#"
<< "\n# Vertex ordering."
<< "\n# list <vertex order> <vertex indices>"
- << "\n#"
- << "\n";
+ << "\n#" << '\n';
// todo: This denotes the natural ordering of vertices, but it needs
// to check this is really always true for a given grid (it's not
switch (dim)
{
case 2:
- out << "\nlist f 0 1 2 3"
- << "\n";
+ out << "\nlist f 0 1 2 3" << '\n';
break;
case 3:
out
<< "\nlist f 0 2 4 6 | 1 3 5 7 | 0 4 1 5 | 2 6 3 7 | 0 1 2 3 | 4 5 6 7"
- << "\n";
+ << '\n';
break;
default:
Assert(false, ExcNotImplemented());
out << "\n#"
<< "\n# List of vertices."
<< "\n# list <id> <vertices>"
- << "\n#"
- << "\n";
+ << "\n#" << '\n';
// run over all active cells and write out a list of
// xyz-coordinates that correspond to vertices
out << "\n#"
<< "\n# List of cells to quadplot."
<< "\n# quadplot <vertex order> <id> <style>"
- << "\n#"
- << "\n";
+ << "\n#" << '\n';
for (unsigned int i = 0; i < tria.n_active_cells(); ++i)
{
out << "\nquadplot f ";
out << axes[j] << i << " ";
out << "\'k#\'";
}
- out << "\n";
+ out << '\n';
// (vi) write footer
out << "\n#"
<< "\n#"
- << "\n#"
- << "\n";
+ << "\n#" << '\n';
// make sure everything now gets to the output stream
out.flush();
{
to_gnuplot << "<" << indep_name << "> ";
}
- to_gnuplot << "\n";
+ to_gnuplot << '\n';
}
else
{
{
to_gnuplot << "<Indep_" << component << "> ";
}
- to_gnuplot << "\n";
+ to_gnuplot << '\n';
}
// write general data stored
for (unsigned int key = 0; key < dataset_key.size(); ++key)
{
to_gnuplot << " " << independent_values[component][key];
}
- to_gnuplot << "\n";
+ to_gnuplot << '\n';
}
to_gnuplot.close();
// support point into the file as
// comments
to_gnuplot << "# Requested location: " << point->requested_location
- << "\n";
+ << '\n';
to_gnuplot << "# DoF_index : Support location (for each component)\n";
for (unsigned int component = 0;
component < dof_handler->get_fe(0).n_components();
component++)
{
to_gnuplot << "# " << point->solution_indices[component] << " : "
- << point->support_point_locations[component] << "\n";
+ << point->support_point_locations[component] << '\n';
}
if (triangulation_changed)
to_gnuplot
}
}
}
- to_gnuplot << "\n";
+ to_gnuplot << '\n';
// write data stored for the point
for (unsigned int key = 0; key < dataset_key.size(); ++key)
component][key];
}
}
- to_gnuplot << "\n";
+ to_gnuplot << '\n';
}
to_gnuplot.close();
PointValueHistory<dim>::status(std::ostream &out)
{
out << "***PointValueHistory status output***\n\n";
- out << "Closed: " << closed << "\n";
- out << "Cleared: " << cleared << "\n";
- out << "Triangulation_changed: " << triangulation_changed << "\n";
- out << "Have_dof_handler: " << have_dof_handler << "\n";
- out << "Geometric Data"
- << "\n";
+ out << "Closed: " << closed << '\n';
+ out << "Cleared: " << cleared << '\n';
+ out << "Triangulation_changed: " << triangulation_changed << '\n';
+ out << "Have_dof_handler: " << have_dof_handler << '\n';
+ out << "Geometric Data" << '\n';
typename std::vector<
internal::PointValueHistoryImplementation::PointGeometryData<dim>>::iterator
for (; point != point_geometry_data.end(); ++point)
{
out << "# Requested location: " << point->requested_location
- << "\n";
+ << '\n';
out << "# DoF_index : Support location (for each component)\n";
for (unsigned int component = 0;
component < dof_handler->get_fe(0).n_components();
component++)
{
out << point->solution_indices[component] << " : "
- << point->support_point_locations[component] << "\n";
+ << point->support_point_locations[component] << '\n';
}
- out << "\n";
+ out << '\n';
}
}
else
out << "#Cannot access DoF_indices once cleared\n";
}
}
- out << "\n";
+ out << '\n';
if (independent_values.size() != 0)
{
out << "Independent value(s): " << independent_values.size() << " : "
- << independent_values[0].size() << "\n";
+ << independent_values[0].size() << '\n';
if (indep_names.size() > 0)
{
out << "Names: ";
{
out << "<" << indep_name << "> ";
}
- out << "\n";
+ out << '\n';
}
}
else
out << data_entry.first << ": " << data_entry.second.size() << " (";
out << mask->second.size() << ", "
<< mask->second.n_selected_components() << ") : ";
- out << (data_entry.second)[0].size() << "\n";
+ out << (data_entry.second)[0].size() << '\n';
}
else
{
out << data_entry.first << ": " << data_entry.second.size() << " (";
out << mask->second.size() << ", "
<< mask->second.n_selected_components() << ") : ";
- out << "No points added"
- << "\n";
+ out << "No points added" << '\n';
}
// add names, if available
if (component_names->second.size() > 0)
{
out << "<" << name << "> ";
}
- out << "\n";
+ out << '\n';
}
}
- out << "\n";
+ out << '\n';
out << "***end of status output***\n\n";
}