File: SensDenseGenSchurDriver.hpp

package info (click to toggle)
coinor-ipopt 3.11.9-2.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 24,616 kB
  • sloc: cpp: 75,373; sh: 11,170; ansic: 2,798; makefile: 2,247; java: 632; fortran: 342
file content (70 lines) | stat: -rw-r--r-- 1,751 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Copyright 2009, 2011 Hans Pirnay
// All Rights Reserved.
// This code is published under the Eclipse Public License.
//
// Date   : 2009-11-19

#ifndef __ASIFTSCHURDRIVER_HPP__
#define __ASIFTSCHURDRIVER_HPP__

#include "SensSchurDriver.hpp"
#include "SensBacksolver.hpp"
#include "IpDenseGenMatrix.hpp"

namespace Ipopt
{

  class DenseGenSchurDriver: public SchurDriver
  {

  public:

    DenseGenSchurDriver(SmartPtr<SensBacksolver> backsolver,
			SmartPtr<PCalculator> pcalc,
			SmartPtr<SchurData> data_B);

    virtual ~DenseGenSchurDriver();

    /** Creates the SchurMatrix from B and P */
    virtual bool SchurBuild();

    /** Calls the factorization routine for the SchurMatrix */
    virtual bool SchurFactorize();

    /** Performs a backsolve on S and : Solves the system
     *
     *  \f[\left[\begin{array}{c|c}
     *  K & E\\\hline
     *  E^T & 0
     *  \end{array}
     *  \right]
     *  \left[\begin{array}{c}x \\ y\end{array}\right] =
     *  \left[\begin{array}{c}f \\ g\end{array}\right]\f]
     *
     *  y will be stored in g at exit.
     *  Kf should hold
     *
     *  \f$K^{-1}f\f$
     *
     *  if it has been computed previously. If it is not available, just
     *  pass in Kf=NULL and it will be computed internally.
     */
    virtual bool SchurSolve(SmartPtr<IteratesVector> x,
			    SmartPtr<const IteratesVector> f,
			    SmartPtr<Vector> g,
			    SmartPtr<IteratesVector> Kf=NULL);

    /** DEPRECATED Performs a backsolve on S and K
	virtual bool SchurSolve(SmartPtr<IteratesVector> lhs,
	SmartPtr<const IteratesVector> rhs,
	SmartPtr<Vector> delta_u);
    */
  private:
    SmartPtr<SchurData> ift_data_;
    SmartPtr<SensBacksolver> backsolver_;
    SmartPtr<DenseGenMatrix> S_;

  };
}

#endif