4 % MassVF (#
benchMassVF3DP1) and StiffElas (
#benchStiffElas3DP1) matrices.
5 % For each assembly matrix, we compare computation times of corresponding functions
6 %
for version 'base',
'OptV0',
'OptV1' and
'OptV2'.
9 % - 'save' : true for saving each bench in latex files. (default false)
10 % - 'directory' : name of the directory for saving `\LaTeX{}` files. (
default 'latex')
11 % -
'name' : base name of `\LaTeX{}` files. (
default 'bench')
12 % -
'LN' : List of
N parameters
for #
CubeMesh function. (
default [5:2:11])
16 %
runBenchs(
'save',
true,
'name',
'benchMatlabR2012b',
'LN',5:3:20)
@endverbatim
18 % Results under Matlab R2012b:
19 % Here are the results on our reference machine.
20 % - functions <b>MassAssembling3DP1</b>
21 % ``\mbox{\input{\INPUTLATEXDIR/benchMatlabR2012b_Mass3DP1.tex}} ``
22 % - functions <b>StiffAssembling3DP1</b>
23 % ``\mbox{\input{\INPUTLATEXDIR/benchMatlabR2012b_Stiff3DP1.tex}} ``
24 % - functions <b>StiffElasAssembling3DP1</b>
25 % ``\mbox{\input{\INPUTLATEXDIR/benchMatlabR2012b_StiffElas3DP1.tex}} ``
26 % - functions <b>MassVFAssembling3DP1</b>
27 % ``\mbox{\input{\INPUTLATEXDIR/benchMatlabR2012b_MassVF3DP1.tex}} ``
29 % % Results under Octave 3.6.3:
30 % Here are the results on our reference machine.
31 % - functions <b>MassAssembling3DP1</b>
32 % ``\mbox{\input{\INPUTLATEXDIR/benchOctave3.6.3_Mass3DP1.tex}} ``
33 % - functions <b>StiffAssembling3DP1</b>
34 % ``\mbox{\input{\INPUTLATEXDIR/benchOctave3.6.3_Stiff3DP1.tex}} ``
35 % - functions <b>StiffElasAssembling3DP1</b>
36 % ``\mbox{\input{\INPUTLATEXDIR/benchOctave3.6.3_StiffElas3DP1.tex}} ``
37 % - functions <b>MassVFAssembling3DP1</b>
38 % ``\mbox{\input{\INPUTLATEXDIR/benchOctave3.6.3_MassVF3DP1.tex}} ``
58 p.addParamValue(
'save',
false, @islogical );
59 p.addParamValue(
'directory',
'latex' , @ischar );
60 p.addParamValue(
'name',
'bench' , @ischar );
61 p.addParamValue(
'LN', [5:2:11], @isnumeric );
66 [succes,message,messageid] = mkdir(
p.Results.directory);
74 BenchToLatexTabular(BenchMass3DP1,[
p.Results.directory,filesep,
p.Results.name,'_Mass3DP1.tex']);
80 BenchToLatexTabular(BenchStiff3DP1,[
p.Results.directory,filesep,
p.Results.name,'_Stiff3DP1.tex']);
86 BenchToLatexTabular(BenchMassVF3DP1,[
p.Results.directory,filesep,
p.Results.name,'_MassVF3DP1.tex']);
92 BenchToLatexTabular(BenchStiffElas3DP1,[
p.Results.directory,filesep,
p.Results.name,'_StiffElas3DP1.tex']);
96 function BenchToLatexTabular(bench,LaTeXFilename)
98 Data=[bench.
Ldof',T(:,1),T(:,1)./T(:,1),T(:,2),T(:,1)./T(:,2),T(:,3),T(:,1)./T(:,3),T(:,4),T(:,1)./T(:,4)];
99 Header={
'$n_{dof}$',
'base',
'OptV0',
'OptV1',
'OptV2'};
100 DataFormat={
'$%d$',
'\\begin{tabular}{c} %.3f (s)\\\\ \\texttt{x %.2f} \\end{tabular}', ...
101 '\\begin{tabular}{c} %.3f (s)\\\\ \\texttt{x %.2f} \\end{tabular}', ...
102 '\\begin{tabular}{c} %.3f (s)\\\\ \\texttt{x %.2f} \\end{tabular}', ...
103 '\\begin{tabular}{c} %.3f (s)\\\\ \\texttt{x %.2f} \\end{tabular}'};
104 ColumnFormat=
'|r||*{4}{c|}';
106 RowHeaderFormat=
'\hline \hline';