Ipopt Documentation  
SensSchurDriver.hpp
Go to the documentation of this file.
1 // Copyright 2009, 2011 Hans Pirnay
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Date : 2009-05-06
6 
7 #ifndef __ASSCHURDRIVER_HPP__
8 #define __ASSCHURDRIVER_HPP__
9 
10 #include "SensSchurData.hpp"
11 #include "SensPCalculator.hpp"
12 #include "IpVector.hpp"
13 #include "IpIteratesVector.hpp"
14 
15 namespace Ipopt
16 {
17 
30 {
31 public:
32 
35  SmartPtr<SchurData> data_B
36  )
37  : pcalc_(pcalc),
38  data_B_(data_B)
39  { }
40 
41  virtual ~SchurDriver()
42  { }
43 
44  virtual bool InitializeImpl(
45  const OptionsList& /*options*/,
46  const std::string& /*prefix*/
47  )
48  {
49  return true;
50  }
51 
54  {
55  return pcalc_->data_A();
56  }
57 
59  {
60  return ConstPtr(data_B_);
61  }
62 
64  {
65  return pcalc_->data_A_nonconst();
66  }
67 
69  {
70  return data_B_;
71  }
72 
74  {
75  return ConstPtr(pcalc_);
76  }
77 
79  {
80  return pcalc_;
81  }
82 
83  /* Sets the Data for which this SchurMatrix will be built. */
84 
86  virtual bool SchurBuild() = 0;
87 
89  virtual bool SchurFactorize() = 0;
90 
95  virtual bool SchurSolve(
98  SmartPtr<Vector> delta_u,
99  SmartPtr<IteratesVector> sol = NULL
100  ) = 0;
101 
102  /* Performs a backsolve on S and K; calls the latter with sol=K^(-1)*r_s=0
103  virtual bool SchurSolve(SmartPtr<IteratesVector> lhs,
104  SmartPtr<const IteratesVector> rhs,
105  SmartPtr<Vector> delta_u) =0;
106  */
107 private:
109  { }
110 
112 
114 };
115 
116 }
117 
118 #endif
This class is the interface for any class that deals with the Schur matrix from the point when it is ...
This is the base class for all algorithm strategy objects.
virtual bool InitializeImpl(const OptionsList &, const std::string &)
Implementation of the initialization method that has to be overloaded by for each derived class...
virtual SmartPtr< const SchurData > data_B() const
virtual SmartPtr< SchurData > data_A_nonconst()
virtual SmartPtr< SchurData > data_B_nonconst()
SchurDriver(SmartPtr< PCalculator > pcalc, SmartPtr< SchurData > data_B)
This file contains a base class for all exceptions and a set of macros to help with exceptions...
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:164
This class stores a list of user set options.
SmartPtr< SchurData > data_B_
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
Definition: IpSmartPtr.hpp:663
SmartPtr< PCalculator > pcalc_
virtual SmartPtr< PCalculator > pcalc_nonconst()
virtual SmartPtr< const PCalculator > pcalc() const
virtual SmartPtr< const SchurData > data_A() const
Const accessor methods to the SchurData for for the derived classes.
#define SIPOPTLIB_EXPORT
Definition: config.h:216