
- •Explanation note
- •Introduction
- •1.Analyzing of given task.
- •1.1.Creation of system if equations.
- •1.2 Topological analyze: definition of branches of tree and antitree, definition of matrixes
- •1.3 Modifying of given system of equations to type, this can be calculated by eller method
- •Inverting of matrixes.
- •2. Developing of serial calculating of given task
- •2.Developing of parallel program for calculating of given task
- •3.1 Prior analysis of possible paralleling variants
- •Virtual speed and efficiency of resource use
- •3.2 Development of parallel program
- •Int mpi_Init(int *argc, char ***argv)
- •Int mpi_Barrier (mpi_Comm comm)
- •Conclusion
- •References
2. Developing of serial calculating of given task
Eller method can be represented by formula:
The obtained formula for the solution is consistent with expansion in a Taylor series up to terms of order h.
This method has a great approximation, moreover, it is often unsustainable - a small error (which comes from the approximation, rounding or initial data) increases with increasing x.
Eller method has the following distinctive features:
1)
One-stage method: to find
,
required only on the previous step
,
.
2) it agrees with Taylor until the number of order hp, where p - the order of method (р=1).
3)
It does not require calculation of derivatives
,
but requires only the calculation of the function.
Flowchart of Eller method is represented on figure 2.1.
Figure 2.1 – Flowchart of Eller method
Results of calculating are represented on figure 2.3.
Time of solving by Eller method with step 0.1 is equal to 172 milliseconds and 548 iterations.
Used system – Windows XP Professional, service pack 3.
Compiller – Microsoft Visual Studio 2005, sp2.
CPU – Intel © Pentium 4 2.87Ghz.
Memory 1 Gb DDR1, clock 800Mhz.
Figure 2.2. – Results of serial solving.
Graphics of X1,X2,X3,X4,X5,Y1,Y2,Y3,Y4,Y5,Y6 are done in MatLAB using F.M script are presented on figures 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 2.10, 2.11, 2.12, 2.13.
F.M script uses input data, that is output data from CALC.EXE program.
Figure 2.3. Graphic of X1
Figure 2.4. Graphic of X2
Figure 2.5. Graphic of X3
Figure 2.6. Graphic of X4
Figure 2.7. Graphic of X5
Figure 2.8. Graphic of Y1
Figure 2.9. Graphic of Y2
Figure 2.10. Graphic of Y3
Figure 2.11. Graphic of Y4
Figure 2.12. Graphic of Y5
Figure 2.13. Graphic of Y6
F.m script:
function f()
fid = fopen(‘file-out1.txt');
x1 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen('file-out2.txt');
x2 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen(''file-out3.txt');
x3 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen('file-out4.txt');
x4 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen('file-out5.txt');
x5 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen('file-out6.txt');
y1 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen('file-out7.txt');
y2 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen(''file-out8.txt');
y3 = fscanf(fid,'%f') % It has two rows now.
fclose(fid)
fid = fopen('file-out9.txt');
y4 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen('file-out10.txt');
y5 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
fid = fopen('file-out11.txt');
y6 = fscanf(fid,'%f'); % It has two rows now.
fclose(fid)
draw_(x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,y6);
end
function draw_( x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,y6)
x = 0:88; % amount of steps
time = 0:12.3/88:12.3; % time of execution
figure
plot(time,x1)
figure
plot(time,x2)
figure
plot(time,x3)
figure
plot(time,x4)
figure
plot(time,x5)
figure
plot(time,y1)
figure
plot(time,y2)
figure
plot(time,y3)
figure
plot(time,y4)
figure
plot(time,y5)
figure
plot(time,y6)
end