pressure_preconditioner_diag Function

private function pressure_preconditioner_diag(params, c) result(diag_value)

Select the active diagonal used by the pressure PCG preconditioner.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
integer, intent(in) :: c

Return Value real(kind=rk)


Source Code

   function pressure_preconditioner_diag(params, c) result(diag_value)
      type(case_params_t), intent(in) :: params
      integer, intent(in) :: c
      real(rk) :: diag_value

      if (params%enable_variable_density) then
         diag_value = pressure_cache%var_diag(c)
      else
         diag_value = pressure_cache%diag(c)
      end if
   end function pressure_preconditioner_diag