Appl_Data_NPSOL.h

00001 #ifndef Appl_Data_npsol_h
00002 #define Appl_Data_npsol_h
00003 
00004 /*----------------------------------------------------------------------
00005   Copyright (c) 2001, Sandia Corporation.   Under the terms of Contract 
00006   DE-AC04-94AL85000, there is a non-exclusive license for use of this 
00007   work by or on behalf of the U.S. Government.
00008  --------------------------------------------------------------------- */
00009 
00010 #ifdef HAVE_CONFIG_H
00011 #include "OPT++_config.h"
00012 #endif
00013 
00014 #ifdef HAVE_STD
00015 #include <cstring>
00016 #else
00017 #include <string.h>
00018 #endif
00019 
00020 #include "globals.h"
00021 
00022 #include "newmatap.h"
00023 
00024 namespace OPTPP {
00025 
00030 class Appl_Data_NPSOL {
00031 private :
00032   int           buffer_len;     
00033   int           buffer_pointer; 
00034   int           dimension;      
00035   int           ncnln;          
00036   double        fvalue_buffer;  
00037   NEWMAT::ColumnVector  *x_buffer;      
00038   NEWMAT::ColumnVector  *grad_buffer;   
00039   NEWMAT::ColumnVector  *constr_buffer; 
00040   NEWMAT::Matrix        *cjac_buffer;   
00041   bool          fvalue_status;  
00042   bool          grad_status;    
00043   bool          constr_status;  
00044   bool          cjac_status;    
00045 
00046 public:
00047   Appl_Data_NPSOL();
00048   Appl_Data_NPSOL(int length);
00049   ~Appl_Data_NPSOL();
00050   bool Compare(NEWMAT::ColumnVector&);
00051   bool getF(NEWMAT::ColumnVector&, real&);
00052   bool getGrad(NEWMAT::ColumnVector&, NEWMAT::ColumnVector&);
00053   bool getConstraint(NEWMAT::ColumnVector&, NEWMAT::ColumnVector&);
00054   bool getCJacobian(NEWMAT::ColumnVector&, NEWMAT::Matrix&);
00055 
00057   void update(int, int, NEWMAT::ColumnVector&, real); 
00059   void update(int, int, NEWMAT::ColumnVector&, NEWMAT::ColumnVector&); 
00061   void update(int, NEWMAT::ColumnVector&, int, NEWMAT::ColumnVector&); 
00063   void update(int, int, NEWMAT::ColumnVector&, int, NEWMAT::ColumnVector&, 
00064     NEWMAT::Matrix&); 
00066   void update(int, int, NEWMAT::ColumnVector&, double, int, 
00067     NEWMAT::ColumnVector&); 
00069   void update(int, int, NEWMAT::ColumnVector&, double, int, 
00070     NEWMAT::ColumnVector&, NEWMAT::Matrix&); 
00071 };
00072 
00073 } // namespace OPTPP
00074 
00075 #endif
00076 
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3