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

[test.momentmodel.mn] fix sign of boundary terms

parent 963fe31b
No related branches found
No related tags found
No related merge requests found
...@@ -217,14 +217,20 @@ struct HyperbolicMnDiscretization ...@@ -217,14 +217,20 @@ struct HyperbolicMnDiscretization
DynamicRangeType& g, DynamicRangeType& g,
const XT::Common::Parameter& param) { const XT::Common::Parameter& param) {
// influx // influx
// boundary_kinetic flux is caclulated as <(v*n_outside) b psi>, so it should have a positive sign in the
// timestepper update. As the advection operator is added to the timestepper with negative sign, we need to
// multiply by -1 here.
boundary_kinetic_fluxes.evaluate( boundary_kinetic_fluxes.evaluate(
intersection.geometry().global(xx_in_reference_intersection_coordinates), g, param); intersection.geometry().global(xx_in_reference_intersection_coordinates), g, param);
g *= -1.;
// outflux // outflux
const auto& entity = intersection.inside(); const auto& entity = intersection.inside();
const auto dd = intersection.indexInInside() / 2; const auto dd = intersection.indexInInside() / 2;
const auto alpha_entity = entropy_flux->get_alpha(entity, u_in, true)->first; const auto alpha_entity = entropy_flux->get_alpha(entity, u_in, true)->first;
const auto outflux = const auto outflux =
entropy_flux->evaluate_kinetic_outflow(alpha_entity, intersection.centerUnitOuterNormal(), dd); entropy_flux->evaluate_kinetic_outflow(alpha_entity, intersection.centerUnitOuterNormal(), dd);
// outflux is calculated as <(v*n) b psi>, so it should have a negative sign in the timestepper update, which
// is why it has a positive sign here (see previous comment).
g += outflux; g += outflux;
}; };
advection_operator.append(boundary_lambda, {}, boundary_intersection_filter); advection_operator.append(boundary_lambda, {}, boundary_intersection_filter);
......
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