boundary_density_for_cell Function

private function boundary_density_for_cell(params, transport, cell_id) result(rho_b)

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(transport_properties_t), intent(in) :: transport
integer, intent(in) :: cell_id

Return Value real(kind=rk)


Source Code

   real(rk) function boundary_density_for_cell(params, transport, cell_id) result(rho_b)
      type(case_params_t), intent(in) :: params
      type(transport_properties_t), intent(in) :: transport
      integer, intent(in) :: cell_id

      rho_b = params%rho
      if (params%enable_variable_density) then
         if (allocated(transport%rho)) then
            if (cell_id >= 1 .and. cell_id <= size(transport%rho)) then
               rho_b = max(transport%rho(cell_id), tiny_safe)
            end if
         end if
      end if
   end function boundary_density_for_cell