Skip to content

Instantly share code, notes, and snippets.

@jstults
Created January 29, 2012 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstults/1700401 to your computer and use it in GitHub Desktop.
Save jstults/1700401 to your computer and use it in GitHub Desktop.
Falkner-Skan IVP
module fs
implicit none
contains
subroutine rates(F, t, y, arg)
double complex, intent(in) :: t
double complex, intent(in), dimension(3) :: y, arg
double complex, intent(out), dimension(3,1) :: F
F(1,1) = y(2)*arg(3)
F(2,1) = arg(3)*y(3)
F(3,1) = -arg(1)*y(1)*arg(3)*y(3)+arg(2)*y(2)**2*arg(3)-arg(2)*arg(3)
end subroutine rates
subroutine jac(pJ, t, y, arg)
double complex, intent(in) :: t
double complex, intent(in), dimension(3) :: y, arg
double complex, intent(out), dimension(3,3) :: pJ
pJ(1,1) = 0
pJ(1,2) = arg(3)
pJ(1,3) = 0
pJ(2,1) = 0
pJ(2,2) = 0
pJ(2,3) = arg(3)
pJ(3,1) = -arg(1)*arg(3)*y(3)
pJ(3,2) = 2*arg(2)*y(2)*arg(3)
pJ(3,3) = -arg(1)*y(1)*arg(3)
end subroutine jac
end module fs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment