12.07.2015 Views

1.4. Rung˙es ir Kuto metodas - techmat.vgtu.lt

1.4. Rung˙es ir Kuto metodas - techmat.vgtu.lt

1.4. Rung˙es ir Kuto metodas - techmat.vgtu.lt

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

24 1 SKYRIUS. PDL PRADINIS UŽDAVINYS(1.38) algoritmas0, 5 0, 50 1⎧⎪⎨⎪⎩K 1 = F (t n , Y n ),K 2 = F ( t n + 1 2 τ n+1, Y n + 1 2 τ n+1K 1),Y n+1 − Y nτ n+1= K 2 .Pateiksime m-pakopio Rungės <strong>ir</strong> <strong>Kuto</strong> metodo algoritma.˛procedure Rungės <strong>ir</strong> <strong>Kuto</strong> metodo algoritmasbegin1. Pradinės sąlygos skaičiavimast = 0, n = 0for i = 1 to MY N[i] = U 0 [i]end for2. Sprendinio skaičiavimas nauju laiku t n+1while ( (t + τ n+1 ) ≤ T )for i = 1 to MY S[i] = Y N[i]end for3. Tarpinių vektorių K j skaičiavimasfor i = 1 to MK 1 [i] = f i (t, Y S)end forfor j = 2 to mfor i = 1 to MY N[i] = Y S[i]for k = 1 to j − 1Y N[i] = Y N[i] + τ n+1 b jk K k [i]end forend for

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!