compute_max_wave_speed_2d Function

public function compute_max_wave_speed_2d(state) result(s_max)

Global maximum signal speed max_{i,j}( max(|u|,|v|) + c ) over interior cells.

Loops the per-rank LOCAL interior (1:nx_local, 1:ny_local) — ub is allocated with local extent — then reduces with par_max_real so every rank returns the same global maximum. Mirrors compute_dt_2d. (At np=1 nx_local==nx, so the serial answer is unchanged.)

Arguments

Type IntentOptional Attributes Name
type(solver_state_2d_t), intent(in) :: state

Return Value real(kind=wp)