2 %
function benchStiffElasP1()
3 % Benchmark
function for StiffElasAssembling3DP1 functions.
7 % - 0 global alternate numbering with local alternate numbering (classical method),
8 % - 1 global block numbering with local alternate numbering,
9 % - 2 global alternate numbering with local block numbering,
10 % - 3 global block numbering with local block numbering.
13 % #StiffElasAssembling3DP1base, #StiffElasAssembling3DP1OptV0, #StiffElasAssembling3DP1OptV1, #StiffElasAssembling3DP1OptV2
24 p.addParamValue(
'LN', [20:10:60], @isnumeric );
25 p.addParamValue(
'Num', 0, @isnumeric );
32 s=sprintf(
'Global alternate numbering / local alternate numbering');
34 s=sprintf(
'Global block numbering / local alternate numbering');
36 s=sprintf(
'Global alternate numbering / local block numbering');
38 s=sprintf(
'Global block numbering / local block numbering');
40 error(
'invalid Num value')
46 fprintf('---------------------------------------------------------\n')
47 fprintf('BENCH (Stiff Elas. Matrix Assembling) %d\n',k)
48 fprintf(' Numbering Choice : %s\n',s);
49 fprintf(' Vertices number : %d - Tetrahedra number : %d\n',Th.nq,Th.nme)
55 fprintf(' CPU times base (ref) : %3.4f (s)\n',
T(k,1))
60 fprintf(' CPU times OptV0 : %3.4f (s) - Error = %e - Speed Up X%3.3f\n',
T(k,2),norm(Mb-
M,Inf),
T(k,1)/
T(k,2))
64 fprintf(' CPU times OptV1 : %3.4f (s) - Error = %e - Speed Up X%3.3f\n',
T(k,3),norm(Mb-M,Inf),
T(k,1)/
T(k,3))
68 fprintf(' CPU times OptV2 : %3.4f (s) - Error = %e - Speed Up X%3.3f\n',
T(k,4),norm(Mb-M,Inf),
T(k,1)/
T(k,4))
75 bench.
LN=
p.Results.
LN;