HDQ Basith Studio

Specialized for graphic design and 3D modelling.

Minggu, 10 Juni 2012

Contoh Runge-Kutta dengan Fortran

 program main !==================================================================== ! Initial value problem for a single 1st-order ODE ! Call Methods: Euler, Predictor-Corrector, Runge-Kutta 4th order !==================================================================== implicit none double precision dx, dt, xi, ti, xf, tf, tmax integer i, key external dx ! open files (if needed) !open (unit=6, file='result1.dat') ! initial conditions xi = 1.00 ti = 0.00 ! "time" step and max time dt =   0.1 tmax = 2.0 ! select a method: ! key=1...

Contoh Differensial dengan Fortran

!==================================================================== !  Driver program: Calculates first- or second-order derivatives !  for a function defined in ni base points !  Method: based on explicit differentiation of Lagrange interpolation !  AG: October 2009 !==================================================================== implicit none integer, parameter :: ni=101    ! initial arrays size for interpolation integer, parameter :: nc=21  ! number of points where derivatives to be calc. double...

Contoh Integral dengan Fortran

http://www.odu.edu/~agodunov/computing/programs/index.html     Program main !============================================= ! Integration of a function using Simpson rule !============================================= implicit none double precision f, a, b, integral integer n, i double precision, parameter:: pi = 3.1415926 external f a = 0.0 b = pi n = 2 write(*,100) do i=1,16    call simpson(f,a,b,integral,n)    write (*,101) n, integral    n = n*2 end do 100   format('    ...

Contoh Metode Eliminasi Gauss dengan Fortran

PROGRAM GAUSSIAN PARAMETER (IN=20) REAL:: A(IN,IN), B(IN) PRINT *,'INPUT NUMBER OF EQUATIONS N=' READ (5,*) N PRINT *,'INPUT MATRIX COEFFICIENTS A(I,J)=' READ (5,*) ((A(I,J),J=1,N),I=1,N) PRINT *,'INPUT RIGHT-HAND SIDE VECTOR B(I)=' READ (5,*) (B(I),I=1,N) WRITE (6,*) ('****GAUSSIAN ELIMINATION ****') WRITE (6,*) WRITE (6,*) ('COEFFICIENT MATRIX you inputed:') CALL PRINTA(A,IN,N,N,6) WRITE(6,*) WRITE(6,*) ('right hand side vector you inputed:') CALL PRINTV(B,N,6) WRITE(6,*) ! CONVERT TO UPPER TRIANGULAR FORM DO K = 1,N-1 IF...

Senin, 04 Juni 2012

Buletin Embun edisi 2

Download Buletin Embun Edisi...