Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Diff.h

Go to the documentation of this file.
00001 
00002 //
00003 //      Title           : Diff.h
00004 //      Project         : OSCAR Version 2.1
00005 //      Created         : 
00006 //      Author          : Jeremy Sevier
00007 //      Platforms       : All
00008 //      Copyright       : Copyright© The University of Texas at Austin, 2002. All rights reserved.
00009 //                 
00010 //          This software and documentation constitute an unpublished work
00011 //          and contain valuable trade secrets and proprietary information
00012 //          belonging to the University. None of the foregoing material may be
00013 //          copied or duplicated or disclosed without the express, written
00014 //          permission of University. THE UNIVERSITY EXPRESSLY DISCLAIMS ANY
00015 //          AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION,
00016 //          INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
00017 //          PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY
00018 //          THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE.
00019 //          NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF
00020 //          THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall the
00021 //          University be liable for incidental, special, indirect, direct or
00022 //          consequential damages or loss of profits, interruption of business,
00023 //          or related expenses which may arise from use of software or documentation,
00024 //          including but not limited to those resulting from defects in software
00025 //          and/or documentation, or loss or inaccuracy of data of any kind.
00026 //
00027 //      Purpose: A Class for taking Derivatives Numerically
00028 //
00029 //----------------------------------------------------------------------------
00030 //
00031 //      $Revisions$
00032 //
00033 //
00035 
00036 #ifndef Diff_h
00037 #define Diff_h
00038 #include "Math/Matrix.h"
00039 #include "Math/MathErrors.h"
00040 #include <vector>
00041 
00042 namespace OSCAR {
00049 class Diff:public virtual Base
00050 {
00051 public:
00057   Diff(std::vector<Vector> function);
00063   Diff(std::vector<double> function);
00068   Diff(const Diff &derivative);
00072   Diff& operator=(const Diff& rhs);
00076   virtual ~Diff();
00083   bool TakeDerivative(double timeStep);
00090   bool TakeSecondDerivative(double timeStep);
00097   bool GetDerivative(std::vector<Vector> &derivative);
00104   bool GetDerivative(std::vector<double> &derivative);
00111   bool GetSecondDerivative(std::vector<Vector> &secondDerivative);
00118   bool GetSecondDerivative(std::vector<double> &secondDerivative);
00119 protected:
00120   double step;
00121   std::vector<Vector> xMatrix;
00122   std::vector<double> xVector;
00123   std::vector<Vector> xMatrixPrime;
00124   std::vector<double> xVectorPrime;
00125   std::vector<Vector> xMatrixDoublePrime;
00126   std::vector<double> xVectorDoublePrime;
00127 };
00128 
00129 }
00130 
00131 #endif
00132 
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations