This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
V = 1; | |
\[Psi] = V y; | |
u1 = D[\[Psi], y]; | |
v1 = D[-\[Psi], x]; | |
StreamPlot[{{u1, v1}, {-v1, u1}}, {x, -3, 3}, {y, -3, 3}, | |
StreamStyle -> {{Blue}, {Red, Dashed, Arrowheads[0]}}, | |
ImageSize -> Medium] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program main | |
use function_parser | |
use iso_fortran_env, only: wp => real64, output_unit | |
implicit none | |
character(len=50):: func ='sin(x)' | |
integer,parameter :: nvar = 1 !! number of variables | |
character(len=*),dimension(nvar),parameter :: var = [ 'x' ] | |
real(wp),dimension(nvar) :: val = [ 2.0_wp ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM ME | |
EXTERNAL ff,ffder | |
x0=1 | |
CALL newton(ff,ffder,x0,1e-7,1e-7,10,iflag) | |
IF(iflag>1) THEN | |
PRINT *, "there was an error occurred" | |
ENDIF | |
fx0=ff(x0) | |
PRINT *, x0,fx0 | |
READ (*,*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"shell_cmd": "gfortran \"${file}\" -o \"${file_path}\\_${file_base_name}\"", | |
"file_regex": "^(?xi:( ^[/] [^:]* ) : (\\d+) : (\\d+) :)", | |
"working_dir": "${file_path}", | |
"selector": "source.modern-fortran, source.fixedform-fortran", | |
"syntax": "GFortranBuild.sublime-syntax", | |
"variants": | |
[ | |
{ | |
"name": "Run", |