Пример: Транспортная логистика
Я ищу:
На главную  |  Добавить в избранное  

Математика /

Метод интегральных тождеств

Документ 1 | Документ 2 | Документ 3 | Документ 4 | Документ 5 | Документ 6 | Документ 7 | Документ 8 | Документ 9 | Документ 10 | Документ 11 | Документ 12 | Документ 13 | Документ 14 | Документ 15 | Документ 16 | Документ 17 | Документ 18 | Документ 19 | Документ 20 | Документ 21 | Документ 22 | Документ 23 | Документ 24 | Документ 25 | Документ 26 | Документ 27 | Документ 28 | Документ 29 | Документ 30 | Документ 31

unit Basis;

interface

const

h1 = 0.1;

h2 = h1;

hh = h2/(h1*h1);

LeftX = -1;

LeftY = 0;

RightX = 1;

RightY = 1;

lenghtX = (RightX-LeftX)/h1;

lenghtY = (RightY-LeftY)/h2;

boolX = Round(lenghtX)Trunc(lenghtX);

boolY = Round(lenghtY)Trunc(lenghtY);

n = Round((RightX-LeftX)/h1) + byte(boolX);

m = Round((RightY-LeftY)/h2) + byte(boolY);

type

Float = Extended;

TMathFunc = function(x,y :Float) :Float;

TVector = array [0..n] of Float;

TMatrix = array [0..m] of TVector;

function x(i :Float) :Float;

function y(j :Float) :Float;

function k(x,t :Float) :Float;

function f(x,t :Float) :Float;

function u0(i :Float) :Float;

function mu1(j :Float) :Float;

function mu2(j :Float) :Float;

function afunc(i,j :Float) :Float;

function phifunc(i,j :Float) :Float;

function Exact(i,j :Float) :Float;

implementation

uses Math;

function x(i :Float) :Float;

begin

Result := LeftX + i*h1;

end;

function y(j :Float) :Float;

begin

Result := LeftY + j*h2;

end;

function u0(i :Float) :Float; //nach. usl. y[i,0]

begin

//Result := 1/(1+sqr(x(i)));

Result := sqr(x(i));

end;

function mu1(j :Float) :Float; //kr. usl. y[0,j]

begin

//Result := 1/(1+y(j)+sqr(LeftX));

Result := sqr(y(j))+sqr(LeftX);

end;

function mu2(j :Float) :Float; //kr. usl. y[n,j]

begin

//Result := 1/(1+y(j)+sqr(RightX));

Result := sqr(y(j))+sqr(RightX);

end;

function k(x,t :Float) :Float;

begin

Result := sqr(t);

end;

function f(x,t :Float) :Float;

begin

Result := 2*t*(1-t);

end;

function afunc(i,j :Float) :Float;

begin

Result := k(x(i-1/2),y(j));

end;

function phifunc(i,j :Float) :Float;

begin

Result := f(x(i),y(j));

end;

function Exact(i,j :Float) :Float;

begin

//Result := 1/(sqr(x(i))+y(j)+1);

Result := sqr(x(i))+sqr(y(j));

end;

end.




Copyright © 2005—2007 «Mark5»