flux Function

pure function flux(v, x, t)

Flux function. Here we define the flux corresponding to Burger's equation.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: v

function v(x,t)

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

spatial variable

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

time variable

Return Value real(kind=rk)


Source Code

   pure real(rk) function flux(v, x, t)
   !! Flux function. Here we define the flux corresponding to Burger's equation.
      real(rk), intent(in) :: v
         !! function v(x,t)
      real(rk), intent(in) :: x(:)
         !! spatial variable
      real(rk), intent(in) :: t
         !! time variable

      flux = (v**2)/2

   end function flux