function runValids(varargin)
%   Run validation tests for Mass (#validMass3DP1), MassVF (#validMassVF3DP1) and
%   Stiff (#validStiff3DP1) matrices.
%
% Parameters:
%   save    :  set to true to save figures in image directory.
%   percent :  value for resizing the figure (only png format). See #SaveFigure
%
%
% See also:
%   #validMass3DP1, #validMassVF3DP1, #validStiff3DP1
%
% Copyright (C) 2013  CJS (LAGA)
%   see README for details
InitOptFEM3D();

p = inputParser; 
  
if isOctave()
  p=p.addParamValue('save', false, @islogical );
  p=p.addParamValue('percent', 50 , @(t) ((t>0)&&(t<=100)) );
  p=p.parse(varargin{:});
else % Matlab
  p.addParamValue('save', false, @islogical );
  p.addParamValue('percent', 50 , @(t) ((t>0)&&(t<=100)) );
  p.parse(varargin{:});
end
close all

figure(1)
validMass3DP1();
SaveFigure(p.Results.save,'validMass3DP1',p.Results.percent)
figure(2)
validMassVF3DP1(0);
SaveFigure(p.Results.save,'validMassVF3DP1',p.Results.percent)
figure(3)
validStiff3DP1();
SaveFigure(p.Results.save,'validStiff3DP1',p.Results.percent)
figure(4)
validStiffElas3DP1(0);
SaveFigure(p.Results.save,'validStiffElas3DP1',p.Results.percent)
