function InitOptFEM2D()
% function InitOptFEM2D()
%   Initialization of the MATLAB search path and loading of msh
%   package for Octave
%
%   If Octave is used, the msh and general packages are automatically loaded.
%
%
% OptFEM2DP1 [V1.2b1] -    Copyright (C) 2013  CJS (LAGA)
%
%   This file is part of OptFEM2DP1.
%   OptFEM2DP1 is free software: you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation, either version 3 of the License, or
%   (at your option) any later version.
%
%   OptFEM2DP1 is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
%
%   You should have received a copy of the GNU General Public License
%   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  addpath([pwd,filesep,'common']);
  addpath([pwd,filesep,'Opt']);
  addpath([pwd,filesep,'base']);
  addpath([pwd,filesep,'valid']);
  addpath([pwd,filesep,'bench']);
  if isOctave()
     more off
 
     pkg load msh
     pkg load general
     graphics_toolkit('fltk')
  end
