Ipopt Documentation  
 
Loading...
Searching...
No Matches
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
15namespace Ipopt
16{
17
29class SIPOPTLIB_EXPORT SchurDriver: public AlgorithmStrategyObject
30{
31public:
32
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,
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 */
107private:
109 { }
110
112
114};
115
116}
117
118#endif
This is the base class for all algorithm strategy objects.
This class stores a list of user set options.
This class is the interface for any class that deals with the Schur matrix from the point when it is ...
virtual SmartPtr< const SchurData > data_B() const
SmartPtr< PCalculator > pcalc_
virtual bool SchurBuild()=0
Creates the SchurMatrix from B and P.
virtual bool SchurSolve(SmartPtr< IteratesVector > lhs, SmartPtr< const IteratesVector > rhs, SmartPtr< Vector > delta_u, SmartPtr< IteratesVector > sol=NULL)=0
Performs a backsolve on S and K.
SmartPtr< SchurData > data_B_
virtual SmartPtr< const SchurData > data_A() const
Const accessor methods to the SchurData for for the derived classes.
virtual SmartPtr< PCalculator > pcalc_nonconst()
virtual SmartPtr< const PCalculator > pcalc() const
virtual SmartPtr< SchurData > data_A_nonconst()
SchurDriver(SmartPtr< PCalculator > pcalc, SmartPtr< SchurData > data_B)
virtual bool SchurFactorize()=0
Calls the factorization routine for the SchurMatrix.
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< SchurData > data_B_nonconst()
Template class for Smart Pointers.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)