--- /dev/null
+Changed: The deprecated entries Text and ShortText in OutputStyle
+have been removed.
+<br>
+(Peter Munch, 2024/08/21)
parameter_file.close();
std::ofstream parameter_out(parameter_filename);
- prm.print_parameters(parameter_out, ParameterHandler::Text);
+ prm.print_parameters(parameter_out, ParameterHandler::PRM);
AssertThrow(
false,
<< "**** directory, or use the following default values\n"
<< "**** to create an input file:\n";
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
- prm.print_parameters(std::cout, ParameterHandler::Text);
+ prm.print_parameters(std::cout, ParameterHandler::PRM);
return false;
}
/* ...and then try to read their values from the input file: */
if (prm_filename.empty())
{
- prm.print_parameters(std::cout, ParameterHandler::Text);
+ prm.print_parameters(std::cout, ParameterHandler::PRM);
AssertThrow(
false, ExcMessage("Please pass a .prm file as the first argument!"));
}
*/
PRM = 0x0010,
- /**
- * Write human readable output suitable to be read by
- * ParameterHandler::parse_input() again.
- *
- * @deprecated Use `PRM` instead of `Text`.
- */
- Text = PRM,
-
/**
* Write parameters as a LaTeX table.
*/
*/
ShortPRM = PRM | Short,
- /**
- * Write the content of ParameterHandler without comments or changed default
- * values.
- *
- * @deprecated Use `ShortPRM` instead of `ShortText`.
- */
- ShortText = ShortPRM,
-
/**
* Write the content of ParameterHandler without comments or changed default
* values as a XML file.
}
// for all of the other formats, print a preamble:
- if (((style & Short) != 0) && ((style & Text) != 0))
+ if (((style & Short) != 0) && ((style & PRM) != 0))
{
// nothing to do
}
- else if ((style & Text) != 0)
+ else if ((style & PRM) != 0)
{
out << "# Listing of Parameters" << std::endl
<< "# ---------------------" << std::endl;
const bool is_short = (style & Short) != 0;
- if ((style & Text) != 0)
+ if ((style & PRM) != 0)
{
// first find out the longest entry name to be able to align the
// equal signs to do this loop over all nodes of the current
else if (is_alias_node(p.second) == false)
++n_sections;
- if (((style & Description) == 0) &&
- (!(((style & Text) != 0) && is_short)) && (n_parameters != 0) &&
- (n_sections != 0))
+ if (((style & Description) == 0) && (!(((style & PRM) != 0) && is_short)) &&
+ (n_parameters != 0) && (n_sections != 0))
out << "\n\n";
}
(is_alias_node(p.second) == false))
{
// first print the subsection header
- if (((style & Text) != 0) || ((style & Description) != 0))
+ if (((style & PRM) != 0) || ((style & Description) != 0))
{
out << std::setw(overall_indent_level * 2) << ""
<< "subsection " << demangle(p.first) << '\n';
recursively_print_parameters(
tree, directory_path, style, overall_indent_level + 1, out);
- if (is_short && ((style & Text) != 0))
+ if (is_short && ((style & PRM) != 0))
{
// write end of subsection.
out << std::setw(overall_indent_level * 2) << ""
<< "end" << '\n';
}
- else if ((style & Text) != 0)
+ else if ((style & PRM) != 0)
{
// write end of subsection. one blank line after each
// subsection
{
deallog << "Number of run: " << run_no << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
{
deallog << "Number of run: " << run_no << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
std::ifstream in(SOURCE_DIR "/parameter_handler_24_in.prm");
prm.parse_input(in, "input file", "", true);
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
-// test the output generated by ParameterHandler::print_parameters(Text)
+// test the output generated by ParameterHandler::print_parameters(PRM)
#include <deal.II/base/parameter_handler.h>
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3_with_alias_03.prm");
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3_with_alias_04.prm");
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3.prm");
prm.print_parameters(deallog.get_file_stream(),
- ParameterHandler::Text |
+ ParameterHandler::PRM |
ParameterHandler::KeepDeclarationOrder);
}
catch (const std::exception &exc)
// read and then write parameters
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_3_with_space.prm");
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
prm.declare_entry("int", "1", Patterns::Integer());
prm.declare_entry("int", "2", Patterns::Integer());
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
-// test ParameterHandler::set(Text)
+// test ParameterHandler::set(PRM)
#include <deal.II/base/parameter_handler.h>
prm.leave_subsection();
// then write
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
prm.leave_subsection();
// then write
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
// and do it again with the opposite
// value
prm.leave_subsection();
// then write
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
// test the output generated by
-// ParameterHandler::print_parameters(Text) when there are spaces in
+// ParameterHandler::print_parameters(PRM) when there are spaces in
// subsection and entry names
#include <deal.II/base/parameter_handler.h>
// as for parameter_handler_3, but
// use different output format
prm.parse_input(SOURCE_DIR "/prm/parameter_handler_8.prm");
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::Text);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::PRM);
}
catch (const std::exception &exc)
{
-// test ParameterHandler::log_parameters(Text)
+// test ParameterHandler::log_parameters(PRM)
#include <deal.II/base/parameter_handler.h>
prm.leave_subsection();
prm.print_parameters(deallog.get_file_stream(),
- ParameterHandler::Text |
+ ParameterHandler::PRM |
ParameterHandler::KeepDeclarationOrder);
deallog << std::boolalpha;
data.add_parameters(prm);
out << "# Default Parameters" << std::endl;
- prm.print_parameters(out, ParameterHandler::ShortText);
+ prm.print_parameters(out, ParameterHandler::ShortPRM);
std::ifstream ifile(SOURCE_DIR "/petsc_snes_00_in.prm");
prm.parse_input(ifile);
out << "# Testing Parameters" << std::endl;
- prm.print_parameters(out, ParameterHandler::ShortText);
+ prm.print_parameters(out, ParameterHandler::ShortPRM);
{
out << "# Test PETSc interface (MFFD)" << std::endl;
data.add_parameters(prm);
out << "# Default Parameters" << std::endl;
- prm.print_parameters(out, ParameterHandler::ShortText);
+ prm.print_parameters(out, ParameterHandler::ShortPRM);
std::ifstream ifile(SOURCE_DIR "/petsc_ts_00_in.prm");
prm.parse_input(ifile);
out << "# Testing Parameters" << std::endl;
- prm.print_parameters(out, ParameterHandler::ShortText);
+ prm.print_parameters(out, ParameterHandler::ShortPRM);
for (int setjaci = 0; setjaci < 2; setjaci++)
{
data.add_parameters(prm);
deallog << "# Default Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
std::ifstream ifile(SOURCE_DIR "/petsc_ts_03_in.prm");
prm.parse_input(ifile);
deallog << "# Testing Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
for (int setjaci = 0; setjaci < 2; setjaci++)
{
data.add_parameters(prm);
deallog << "# Default Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
std::ifstream ifile(SOURCE_DIR "/petsc_ts_03_in.prm");
prm.parse_input(ifile);
deallog << "# Testing Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
for (int setjaci = 0; setjaci < 2; setjaci++)
{
data.add_parameters(prm);
deallog << "# Default Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
std::ifstream ifile(SOURCE_DIR "/petsc_ts_03_in.prm");
prm.parse_input(ifile);
deallog << "# Testing Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
// This test triggers false positives in FPE trapping for some versions of
// PETSc
data.add_parameters(prm);
deallog << "# Default Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
std::ifstream ifile(SOURCE_DIR "/petsc_ts_03_in.prm");
prm.parse_input(ifile);
deallog << "# Testing Parameters" << std::endl;
- prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortText);
+ prm.print_parameters(deallog.get_file_stream(), ParameterHandler::ShortPRM);
// This test triggers false positives in FPE trapping for some versions of
// PETSc
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_01_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_03_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_04_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_06_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_07_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_08_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_09_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_10_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
if (false)
{
std::ofstream ofile(SOURCE_DIR "/arkode_11_in.prm");
- prm.print_parameters(ofile, ParameterHandler::ShortText);
+ prm.print_parameters(ofile, ParameterHandler::ShortPRM);
ofile.close();
}
data.add_parameters(prm);
// std::ofstream ofile(SOURCE_DIR "/ida_01.prm");
- // prm.print_parameters(ofile, ParameterHandler::ShortText);
+ // prm.print_parameters(ofile, ParameterHandler::ShortPRM);
// ofile.close();
std::ifstream ifile(SOURCE_DIR "/ida_01_in.prm");
data.add_parameters(prm);
// std::ofstream ofile(SOURCE_DIR "/ida_01.prm");
- // prm.print_parameters(ofile, ParameterHandler::ShortText);
+ // prm.print_parameters(ofile, ParameterHandler::ShortPRM);
// ofile.close();
std::ifstream ifile(SOURCE_DIR "/ida_01_in.prm");
data.add_parameters(prm);
// std::ofstream ofile(SOURCE_DIR "/ida_03.prm");
- // prm.print_parameters(ofile, ParameterHandler::ShortText);
+ // prm.print_parameters(ofile, ParameterHandler::ShortPRM);
// ofile.close();
std::ifstream ifile(SOURCE_DIR "/ida_03_in.prm");
data.add_parameters(prm);
// std::ofstream ofile(SOURCE_DIR "/ida_04.prm");
- // prm.print_parameters(ofile, ParameterHandler::ShortText);
+ // prm.print_parameters(ofile, ParameterHandler::ShortPRM);
// ofile.close();
std::ifstream ifile(SOURCE_DIR "/ida_04_in.prm");
data.add_parameters(prm);
// std::ofstream ofile(SOURCE_DIR "/ida_04.prm");
- // prm.print_parameters(ofile, ParameterHandler::ShortText);
+ // prm.print_parameters(ofile, ParameterHandler::ShortPRM);
// ofile.close();
std::ifstream ifile(SOURCE_DIR "/ida_04_in.prm");