LSODE.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 1996-2012 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 3 of the License, or (at your
00010 option) any later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, see
00019 <http://www.gnu.org/licenses/>.
00020 
00021 */
00022 
00023 #if !defined (octave_LSODE_h)
00024 #define octave_LSODE_h 1
00025 
00026 #include <cfloat>
00027 
00028 #include "LSODE-opts.h"
00029 #include "lo-math.h"
00030 
00031 class
00032 OCTAVE_API
00033 LSODE : public ODE, public LSODE_options
00034 {
00035 public:
00036 
00037   LSODE (void)
00038     : ODE (), LSODE_options (), initialized (false), method_flag (0),
00039       maxord (0), itask (0), iopt (0), itol (0), liw (0), lrw (0),
00040       iwork (), rwork (), rel_tol (0.0), abs_tol () { }
00041 
00042   LSODE (const ColumnVector& s, double tm, const ODEFunc& f)
00043     : ODE (s, tm, f), LSODE_options (), initialized (false), method_flag (0),
00044       maxord (0), itask (0), iopt (0), itol (0), liw (0), lrw (0),
00045       iwork (), rwork (), rel_tol (0.0), abs_tol () { }
00046 
00047   ~LSODE (void) { }
00048 
00049   ColumnVector do_integrate (double t);
00050 
00051   Matrix do_integrate (const ColumnVector& tout);
00052 
00053   Matrix do_integrate (const ColumnVector& tout, const ColumnVector& tcrit);
00054 
00055   std::string error_message (void) const;
00056 
00057 private:
00058 
00059   bool initialized;
00060 
00061   octave_idx_type method_flag;
00062   octave_idx_type maxord;
00063   octave_idx_type itask;
00064   octave_idx_type iopt;
00065   octave_idx_type itol;
00066 
00067   octave_idx_type liw;
00068   octave_idx_type lrw;
00069 
00070   Array<octave_idx_type> iwork;
00071   Array<double> rwork;
00072 
00073   double rel_tol;
00074 
00075   Array<double> abs_tol;
00076 };
00077 
00078 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines