- Main Page
- Classes
- Files

- File List
- File Members

# contrib/sIPOPT/src/SensSchurDriver.hpp

Go to the documentation of this file.

    00001 // Copyright 2009, 2011 Hans Pirnay
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // Date   : 2009-05-06
    00006
    00007 #ifndef __ASSCHURDRIVER_HPP__
    00008 #define __ASSCHURDRIVER_HPP__
    00009
    00010 #include "SensSchurData.hpp"
    00011 #include "SensPCalculator.hpp"
    00012 #include "IpVector.hpp"
    00013 #include "IpIteratesVector.hpp"
    00014
    00015 namespace Ipopt
    00016 {
    00017
    00018   class SchurDriver : public AlgorithmStrategyObject
    00019   {
    00029   public:
    00030
    00031     SchurDriver(SmartPtr<PCalculator> pcalc,
    00032         SmartPtr<SchurData> data_B)
    00033       :
    00034       pcalc_(pcalc),
    00035       data_B_(data_B)
    00036     {
    00037     }
    00038
    00039     virtual ~SchurDriver()
    00040     {
    00041     }
    00042
    00044     virtual bool InitializeImpl(const OptionsList& options,
    00045                                 const std::string& prefix)
    00046     {
    00047       return true;
    00048     }
    00049
    00051     virtual SmartPtr<const SchurData> data_A() const
    00052     {
    00053       return pcalc_->data_A();
    00054     }
    00055
    00056     virtual SmartPtr<const SchurData> data_B() const
    00057     {
    00058       return ConstPtr(data_B_);
    00059     }
    00060
    00061     virtual SmartPtr<SchurData> data_A_nonconst()
    00062     {
    00063       return pcalc_->data_A_nonconst();
    00064     }
    00065
    00066     virtual SmartPtr<SchurData> data_B_nonconst()
    00067     {
    00068       return data_B_;
    00069     }
    00070
    00071     virtual SmartPtr<const PCalculator> pcalc() const
    00072     {
    00073       return ConstPtr(pcalc_);
    00074     }
    00075
    00076     virtual SmartPtr<PCalculator> pcalc_nonconst()
    00077     {
    00078       return pcalc_;
    00079     }
    00080
    00084     virtual bool SchurBuild() =0;
    00085
    00087     virtual bool SchurFactorize() =0;
    00088
    00090     virtual bool SchurSolve(SmartPtr<IteratesVector> lhs,
    00091                 SmartPtr<const IteratesVector> rhs,
    00092                 SmartPtr<Vector> delta_u,
    00093                 SmartPtr<IteratesVector> sol=NULL)=0; // the vector K^(-1)*r_s which usually should have been computed before.
    00094
    00095
    00101   private:
    00102     SchurDriver()
    00103     {
    00104     }
    00105
    00106     SmartPtr<PCalculator> pcalc_;
    00107
    00108     SmartPtr<SchurData> data_B_;
    00109   };
    00110 }
    00111
    00112 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines