Validate scalar/momentum advection names at input time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | scheme_name | |||
| character(len=*), | intent(in) | :: | scope | |||
| logical, | intent(in) | :: | allow_scalar_high_order |
subroutine validate_advection_scheme(scheme_name, scope, allow_scalar_high_order) character(len=*), intent(in) :: scheme_name character(len=*), intent(in) :: scope logical, intent(in) :: allow_scalar_high_order character(len=len(scheme_name)) :: scheme scheme = trim(lowercase(scheme_name)) if (len_trim(scheme) == 0) scheme = 'upwind' select case (trim(scheme)) case ('upwind', 'first_order_upwind', 'first-order-upwind', & 'central', 'central_difference', 'central-difference') return case ('bounded_central', 'bounded-central', 'bounded_linear', 'bounded-linear', & 'deferred_central', 'deferred-correction', & 'muscl', 'limited_linear', 'limited-linear', 'linear_upwind', 'linear-upwind', & 'higher_order_bounded', 'higher-order-bounded', & 'quick', 'hlpa', 'quick_limited', 'quick-limited') if (allow_scalar_high_order) return case default continue end select if (allow_scalar_high_order) then call fatal_error('input', trim(scope)//' must be one of: upwind, central, bounded_central, bounded_linear, muscl, limited_linear, quick, hlpa') else call fatal_error('input', trim(scope)//' must be one of: upwind, central') end if end subroutine validate_advection_scheme