Skip to content

Commit

Permalink
Fix parameter file templates printing
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisb committed Aug 26, 2024
1 parent 9101a0d commit 122df09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
14 changes: 8 additions & 6 deletions applications/dem_parameter_template/dem_parameter_template.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ main()
DEMSolverParameters<2> dem_parameters;
dem_parameters.declare(prm);
std::ofstream output_prm("dem-2d.prm");
#if DEAL_II_VERSION_GTE(9, 7, 0)
prm.print_parameters(output_prm, prm.DefaultStyle);

std::ofstream output_xml("dem-2d.xml");
prm.print_parameters(output_xml, prm.XML);
#else
prm.print_parameters(output_prm, prm.Text);
#endif
}
{
ParameterHandler prm;
DEMSolverParameters<3> dem_parameters;
dem_parameters.declare(prm);
std::ofstream output_prm("dem-3d.prm");
#if DEAL_II_VERSION_GTE(9, 7, 0)
prm.print_parameters(output_prm, prm.DefaultStyle);

std::ofstream output_xml("dem-3d.xml");
prm.print_parameters(output_xml, prm.XML);
#else
prm.print_parameters(output_prm, prm.Text);
#endif
}
}
catch (std::exception &exc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,23 @@ main()

nsparam.declare(prm, size_of_subsections);
std::ofstream output_prm("template-2d.prm");
#if DEAL_II_VERSION_GTE(9, 7, 0)
prm.print_parameters(output_prm, prm.DefaultStyle);
#else
prm.print_parameters(output_prm, prm.text);
#endif
}
{
ParameterHandler prm;
SimulationParameters<3> nsparam;

nsparam.declare(prm, size_of_subsections);
std::ofstream output_prm("template-3d.prm");
#if DEAL_II_VERSION_GTE(9, 7, 0)
prm.print_parameters(output_prm, prm.DefaultStyle);
#else
prm.print_parameters(output_prm, prm.text);
#endif
}
}
catch (std::exception &exc)
Expand Down

0 comments on commit 122df09

Please sign in to comment.