atl_modg_2d_ensure_pos_facemean Subroutine

public subroutine atl_modg_2d_ensure_pos_facemean(nElems_fluid, volState, faceRep, nScalars, ensure_positivity)

Lift the mean on the face to a positive value if necessary.

In some equations, some variables may not be allowed to be negative, for example the density and energy in flow simulations. With this routine we enforce this limitation for the projected mean state on the element surfaces.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nElems_fluid

Number of fluid elements

real(kind=rk), intent(in) :: volState(:,:,:)

Volumetric modal states for each element

type(atl_faceRep_type), intent(inout) :: faceRep(:)

Modal representation on the face that might need limiting.

All means below 0 of variables where positivity is to be ensured will be increased to a small value above 0.

integer, intent(in) :: nScalars

Number of variables

logical, intent(in) :: ensure_positivity(:)

Indication for each variable, whether positivity is to be ensured or not.

Only variables where this is set to .true. will be modified by this routine.