Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Nov 20, 2023
1 parent 4830bbb commit af19dbf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/solvers/dgsem_tree/subcell_limiters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ end
Subcell invariant domain preserving (IDP) limiting used with [`VolumeIntegralSubcellLimiting`](@ref)
including:
- Local maximum/minimum Zalesak-type limiting for conservative variables (`local_minmax_variables_cons`)
- Positivity limiting for conservative (`positivity_variables_cons`) and non-linear variables (`positivity_variables_nonlinear`)
- Positivity limiting for conservative (`positivity_variables_cons`) and nonlinear variables (`positivity_variables_nonlinear`)
- One-sided limiting for specific and mathematical entropy (`spec_entropy`, `math_entropy`)
Conservative variables to be limited are passed as a vector of strings, e.g. `local_minmax_variables_cons = ["rho"]`
and `positivity_variables_cons = ["rho"]`. For non-linear variables the specific functions are
and `positivity_variables_cons = ["rho"]`. For nonlinear variables the specific functions are
passed in a vector, e.g. `positivity_variables_nonlinear = [pressure]`.
The bounds can be calculated using the `bar_states` or the low-order FV solution. The positivity
limiter uses `positivity_correction_factor` such that `u^new >= positivity_correction_factor * u^FV`.
The Newton-bisection method for the limiting of non-linear variables uses maximal `max_iterations_newton`
The Newton-bisection method for the limiting of nonlinear variables uses maximal `max_iterations_newton`
iterations, tolerances `newton_tolerances` and the gamma constant `gamma_constant_newton`
(gamma_constant_newton>=2*d, where d=#dimensions).
Expand Down
19 changes: 14 additions & 5 deletions src/solvers/dgsem_tree/subcell_limiters_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,22 @@ end
mesh, _, _, _ = mesh_equations_solver_cache(semi)

# Conservative variables
@trixi_timeit timer() "conservative variables" for variable in limiter.positivity_variables_cons
idp_positivity!(alpha, limiter, u, dt, semi, mesh, elements, variable)
for variable in limiter.positivity_variables_cons
@trixi_timeit timer() "conservative variables" idp_positivity!(alpha, limiter,
u, dt, semi,
mesh, elements,
variable)
end

# Nonlinear variables
@trixi_timeit timer() "non-linear variables" for variable in limiter.positivity_variables_nonlinear
idp_positivity_nonlinear!(alpha, limiter, u, dt, semi, mesh, elements, variable)
for variable in limiter.positivity_variables_nonlinear
@trixi_timeit timer() "nonlinear variables" idp_positivity_nonlinear!(alpha,
limiter,
u, dt,
semi,
mesh,
elements,
variable)
end

return nothing
Expand Down Expand Up @@ -661,7 +670,7 @@ end
end

###############################################################################
# Global positivity limiting of non-linear variables
# Global positivity limiting of nonlinear variables

@inline function idp_positivity_nonlinear!(alpha, limiter, u, dt, semi,
mesh::TreeMesh{2}, elements, variable)
Expand Down

0 comments on commit af19dbf

Please sign in to comment.