OptFEM2DP1  1.0
Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D
 All Files Functions Variables Groups Pages
runValids.m
Go to the documentation of this file.
1 function runValids(varargin)
2 % function runValids(varargin)
3 % Run validation tests for Mass (#validMassP1), MassW (#validMassWP1) and
4 % Stiff (#validStiffP1) matrices.
5 %
6 % Parameters:
7 % save : set to true to save figures in image directory.
8 % percent : value for resizing the figure (only png format). See #SaveFigure
9 %
10 % Examples:
11 % - validMassP1() figure
12 % \image html images/validMassP1.png "figure : Mass order validation"
13 % - validMassWP1() figure
14 % \image html images/validMassWP1.png "figure : MassW order validation"
15 % - validStiffP1() figure
16 % \image html images/validStiffP1.png "figure : Stiff order validation"
17 %
18 % See also:
19 % #validMassP1, #validMassWP1, #validStiffP1, #SaveFigure
20 %
21 % OptFEM2DP1 [V1.0e] - Copyright (C) 2013 CJS (LAGA)
22 %
23 % This file is part of OptFEM2DP1.
24 % OptFEM2DP1 is free software: you can redistribute it and/or modify
25 % it under the terms of the GNU General Public License as published by
26 % the Free Software Foundation, either version 3 of the License, or
27 % (at your option) any later version.
28 %
29 % OptFEM2DP1 is distributed in the hope that it will be useful,
30 % but WITHOUT ANY WARRANTY; without even the implied warranty of
31 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 % GNU General Public License for more details.
33 %
34 % You should have received a copy of the GNU General Public License
35 % along with this program. If not, see <http://www.gnu.org/licenses/>.
36 InitOptFEM2D();
37 
38 p = inputParser;
39 
40 if isOctave()
41  p=p.addParamValue('save', false, @islogical );
42  p=p.addParamValue('percent', 50 , @(t) ((t>0)&&(t<=100)) );
43  p=p.parse(varargin{:});
44 else % Matlab
45  p.addParamValue('save', false, @islogical );
46  p.addParamValue('percent', 50 , @(t) ((t>0)&&(t<=100)) );
47  p.parse(varargin{:});
48 end
49 close all
50 
51 figure(1)
52 validMassP1();
53 SaveFigure(p.Results.save,'validMassP1',p.Results.percent)
54 figure(2)
55 validMassWP1();
56 SaveFigure(p.Results.save,'validMassWP1',p.Results.percent)
57 figure(3)
58 validStiffP1();
59 SaveFigure(p.Results.save,'validStiffP1',p.Results.percent)