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 % Function for running validation tests.
4 %
5 % Parameters:
6 % save : set to true to save figures in image directory.
7 % percent : set color mesh lines
8 %
9 % Examples:
10 % - validMassP1() figure
11 % \image html images/validMassP1.png "figure : Mass order validation"
12 % - validMassWP1() figure
13 % \image html images/validMassWP1.png "figure : MassW order validation"
14 % - validStiffP1() figure
15 % \image html images/validStiffP1.png "figure : Stiff order validation"
16 %
17 % See also:
18 % #validMassP1, #validMassWP1, #validStiffP1
19 %
20 %
21 % OptFEM2DP1 [V1.0d] - 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 if isOctave()
39 pkg load general
40 end
41 p = inputParser;
42 %
43 %
44 if isOctave()
45 pkg load general
46 p=p.addParamValue('save', false, @islogical );
47 p=p.addParamValue('percent', 50 , @(t) ((t>0)&&(t<=100)) );
48 p=p.parse(varargin{:});
49 else % Matlab
50 p.addParamValue('save', false, @islogical );
51 p.addParamValue('percent', 50 , @(t) ((t>0)&&(t<=100)) );
52 p.parse(varargin{:});
53 end
54 close all
55 
56 
57 figure(1)
58 validMassP1();
59 SaveFigure(p.Results.save,'validMassP1',p.Results.percent)
60 figure(2)
61 validMassWP1();
62 SaveFigure(p.Results.save,'validMassWP1',p.Results.percent)
63 figure(3)
64 validStiffP1();
65 SaveFigure(p.Results.save,'validStiffP1',p.Results.percent)