/home/coin/SVN-release/CoinAll-1.1.0/Ipopt/src/Algorithm/LinearSolvers/IpSymLinearSolver.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2004, 2006 International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // $Id: IpSymLinearSolver.hpp 699 2006-04-05 21:05:18Z andreasw $
00006 //
00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
00008 
00009 #ifndef __IPSYMLINEARSOLVER_HPP__
00010 #define __IPSYMLINEARSOLVER_HPP__
00011 
00012 #include "IpUtils.hpp"
00013 #include "IpSymMatrix.hpp"
00014 #include "IpAlgStrategy.hpp"
00015 #include <vector>
00016 
00017 namespace Ipopt
00018 {
00019 
00021   enum ESymSolverStatus {
00023     SYMSOLVER_SUCCESS,
00025     SYMSOLVER_SINGULAR,
00027     SYMSOLVER_WRONG_INERTIA,
00030     SYMSOLVER_CALL_AGAIN,
00033     SYMSOLVER_FATAL_ERROR
00034   };
00035 
00050   class SymLinearSolver: public AlgorithmStrategyObject
00051   {
00052   public:
00055     SymLinearSolver()
00056     {}
00057 
00058     virtual ~SymLinearSolver()
00059     {}
00061 
00063     virtual bool InitializeImpl(const OptionsList& options,
00064                                 const std::string& prefix) = 0;
00065 
00080     virtual ESymSolverStatus MultiSolve(const SymMatrix &A,
00081                                         std::vector<SmartPtr<const Vector> >& rhsV,
00082                                         std::vector<SmartPtr<Vector> >& solV,
00083                                         bool check_NegEVals,
00084                                         Index numberOfNegEVals)=0;
00085 
00089     ESymSolverStatus Solve(const SymMatrix &A,
00090                            const Vector& rhs, Vector& sol,
00091                            bool check_NegEVals,
00092                            Index numberOfNegEVals)
00093     {
00094       std::vector<SmartPtr<const Vector> > rhsV(1);
00095       rhsV[0] = &rhs;
00096       std::vector<SmartPtr<Vector> > solV(1);
00097       solV[0] = &sol;
00098       return MultiSolve(A, rhsV, solV, check_NegEVals,
00099                         numberOfNegEVals);
00100     }
00101 
00108     virtual Index NumberOfNegEVals() const =0;
00110 
00111     //* @name Options of Linear solver */
00113 
00118     virtual bool IncreaseQuality() =0;
00119 
00123     virtual bool ProvidesInertia() const =0;
00125   };
00126 
00127 
00128 } // namespace Ipopt
00129 
00130 #endif

Generated on Sun Nov 14 14:06:35 2010 for Coin-All by  doxygen 1.4.7