Skip to content
Snippets Groups Projects
Commit 163b6ae5 authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[test.momentmodels] some small improvements

parent 0c1a722c
No related branches found
No related tags found
No related merge requests found
...@@ -236,8 +236,7 @@ public: ...@@ -236,8 +236,7 @@ public:
const auto& local_alpha_dofs = local_alpha_->dofs(); const auto& local_alpha_dofs = local_alpha_->dofs();
for (size_t ii = 0; ii < dimRange; ++ii) for (size_t ii = 0; ii < dimRange; ++ii)
alpha_tmp_[ii] = local_alpha_dofs.get_entry(ii); alpha_tmp_[ii] = local_alpha_dofs.get_entry(ii);
static const bool adjust = static const bool adjust = DXTC_CONFIG_GET("adjust_alpha", 0);
DXTC_CONFIG_GET("adjust_alpha", GDT::is_partial_moment_basis<MomentBasis>::value ? 0 : 1);
static const double adjust_dt = DXTC_CONFIG_GET("adjust_dt", 1.0e-3); static const double adjust_dt = DXTC_CONFIG_GET("adjust_dt", 1.0e-3);
if (adjust && dt_ < adjust_dt) { if (adjust && dt_ < adjust_dt) {
const bool changed = basis_functions.adjust_alpha_to_ensure_min_density( const bool changed = basis_functions.adjust_alpha_to_ensure_min_density(
......
...@@ -162,7 +162,7 @@ struct HyperbolicEntropicCoordsMnDiscretization ...@@ -162,7 +162,7 @@ struct HyperbolicEntropicCoordsMnDiscretization
std::make_shared<const MomentBasis>(quad_order, quad_refinements); std::make_shared<const MomentBasis>(quad_order, quad_refinements);
const RangeFieldType psi_vac = DXTC_CONFIG_GET("psi_vac", 1e-6 / basis_functions->unit_ball_volume()); const RangeFieldType psi_vac = DXTC_CONFIG_GET("psi_vac", 1e-6 / basis_functions->unit_ball_volume());
const std::unique_ptr<ProblemType> problem_ptr = const std::unique_ptr<ProblemType> problem_ptr =
std::make_unique<ProblemType>(*basis_functions, grid_view, psi_vac, grid_config, true); std::make_unique<ProblemType>(*basis_functions, grid_view, psi_vac, grid_config, true, 1e-09);
const auto& problem = *problem_ptr; const auto& problem = *problem_ptr;
const auto initial_values_u = problem.initial_values(); const auto initial_values_u = problem.initial_values();
const auto boundary_values_u = problem.boundary_values(); const auto boundary_values_u = problem.boundary_values();
...@@ -314,6 +314,8 @@ struct HyperbolicEntropicCoordsMnDiscretization ...@@ -314,6 +314,8 @@ struct HyperbolicEntropicCoordsMnDiscretization
filename += "_quad_" + XT::Common::to_string(quad_refinements) + "x" + XT::Common::to_string(quad_order); filename += "_quad_" + XT::Common::to_string(quad_refinements) + "x" + XT::Common::to_string(quad_order);
filename += "_atol_" + XT::Common::to_string(atol); filename += "_atol_" + XT::Common::to_string(atol);
filename += "_rtol_" + XT::Common::to_string(rtol); filename += "_rtol_" + XT::Common::to_string(rtol);
filename += "_adjust_"
+ XT::Common::to_string(DXTC_CONFIG_GET("adjust_alpha", 0) ? DXTC_CONFIG_GET("adjust_dt", 1e-3) : 0.);
filename += "_threads_" + DXTC_CONFIG.get("threading.max_count", "1") + "x" filename += "_threads_" + DXTC_CONFIG.get("threading.max_count", "1") + "x"
+ DXTC_CONFIG.get("threading.partition_factor", "1"); + DXTC_CONFIG.get("threading.partition_factor", "1");
filename += TestCaseType::reconstruction ? "_ord2" : "_ord1"; filename += TestCaseType::reconstruction ? "_ord2" : "_ord1";
...@@ -378,8 +380,8 @@ struct HyperbolicEntropicCoordsMnDiscretization ...@@ -378,8 +380,8 @@ struct HyperbolicEntropicCoordsMnDiscretization
num_save_steps, num_save_steps,
num_output_steps, num_output_steps,
false, false,
true, DXTC_CONFIG_GET("visualize", true),
true, DXTC_CONFIG_GET("write_txt", true),
false, false,
true, true,
filename, filename,
......
...@@ -289,8 +289,8 @@ struct HyperbolicMnDiscretization ...@@ -289,8 +289,8 @@ struct HyperbolicMnDiscretization
num_save_steps, num_save_steps,
num_output_steps, num_output_steps,
false, false,
true, DXTC_CONFIG_GET("visualize", true),
true, DXTC_CONFIG_GET("write_txt", true),
false, false,
true, true,
filename, filename,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment