25.03.2014, 15:55   #1 (permalink)
MacClane
 
: 13.03.2014
: 2
() : 0
0 () 0
: 10
 4- PASCAL

program VOLNA; { * ** * * }
uses Crt,Matfunc,Service;
const
N = 2; { **** । 冷 ⥬ }
type
N1 = 1..N;
ar = array[N1] of extended;
var { ६** **樨 ⮤* - }
J1: N1;
X,XP,XK,HP,E: extended;
U,PU: ar;

Procedure URAV(X: extended;U: ar; var PU: ar); forward;
Procedure PRODUCT; forward;

Procedure KM(var X: extended;U: ar); { ⮤* * - ** }
type
N2 = 1..5;
arr = array[N1,N2] of extended;
var { ६** **樨 ⮤* - }
J2: N2;
JJ: boolean;
K: arr;
Xi_1,H: extended;
Ui_1,UU,G,D: ar;
Procedure KOEFF(H: extended;PU: ar; var K: arr);
begin { * 樥*⮢ - Kj,i }
for J1:=1 to N do
K[J1,J2]:= H*PU[J1]/3;
end;
begin
XP:=HP;
H:=HP;
Xi_1:=X;
for J1:=1 to N do
Ui_1[J1]:=U[J1];
while XK > X do { - ᫮ *** ** }
begin
repeat { ** 横* ஡* ** }
JJ:=true;
X:=Xi_1;
for J1:=1 to N do
U[J1]:=Ui_1[J1];
URAV(X,U,PU);
J2:=1; { ।* Kj,1 }
KOEFF(H,PU,K);
X:=Xi_1+H/3;
for J1:=1 to N do
U[J1]:=Ui_1[J1]+K[J1,1];
URAV(X,U,PU);
J2:=2; { ।* Kj,2 }
KOEFF(H,PU,K);
X:=Xi_1+H/3;
for J1:=1 to N do
U[J1]:=Ui_1[J1]+(K[J1,1]+K[J1,2])/2;
URAV(X,U,PU);
J2:=3; { ।* Kj,3 }
KOEFF(H,PU,K);
X:=Xi_1+H/2;
for J1:=1 to N do
U[J1]:=Ui_1[J1]+(3*K[J1,1]+9*K[J1,3])/8;
URAV(X,U,PU);
J2:=4; { ।* Kj,4 }
KOEFF(H,PU,K);
X:=Xi_1+H; { * *㬥** i- 窥 }
for J1:=1 to N do
begin
UU[J1]:=Ui_1[J1]+(3*K[J1,1]-9*K[J1,3])/2+6*K[J1,4];
U[J1]:=UU[J1];
end;
URAV(X,U,PU);
J2:=5; { ।* Kj,5 }
KOEFF(H,PU,K);
for J1:=1 to N do { * j- ६** i- 窥 }
U[J1]:=Ui_1[J1]+(K[J1,1]+4*K[J1,4]+K[J1,5])/2;
for J1:=1 to N do { * * }
D[J1]:=(abs(UU[J1]-U[J1]))/5;
for J1:=1 to N do
begin { 롮 * }
if abs(U[J1]) > 1
then G[J1]:=E*abs(U[J1])
else G[J1]:=E;
end;
for J1:=1 to N do { ᫮ ஡* ** }
if D[J1] > G[J1] then JJ:=false;
H:=H/2;
until JJ; { * 横* ஡* ** }
H:=2*H;
URAV(X,U,PU); { * ந* i- 窥 }
PRODUCT;
for J1:=1 to N do { ᫮ 㤢* ** }
if G[J1] < 32*D[J1] then JJ:=false;
if JJ = true then H:=2*H;
if H > HP then H:=HP; { *** ** 㢥* ** }
Xi_1:=X;
for J1:=1 to N do
Ui_1[J1]:=U[J1];
end; { * 横* *** ** }
end;




-. 2- . 4-
MacClane   
Ads

Member
 
: 31.10.2006
: 40200
: 0
() : 0
0 () 0
: 55070