Epetra Package Browser (Single Doxygen Collection) Development
Epetra_SerialSpdDenseSolver.h
Go to the documentation of this file.
00001 /*
00002 //@HEADER
00003 // ************************************************************************
00004 // 
00005 //               Epetra: Linear Algebra Services Package 
00006 //                 Copyright 2011 Sandia Corporation
00007 // 
00008 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009 // the U.S. Government retains certain rights in this software.
00010 //
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are
00013 // met:
00014 //
00015 // 1. Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 //
00018 // 2. Redistributions in binary form must reproduce the above copyright
00019 // notice, this list of conditions and the following disclaimer in the
00020 // documentation and/or other materials provided with the distribution.
00021 //
00022 // 3. Neither the name of the Corporation nor the names of the
00023 // contributors may be used to endorse or promote products derived from
00024 // this software without specific prior written permission.
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00039 // 
00040 // ************************************************************************
00041 //@HEADER
00042 */
00043 
00044 #ifndef EPETRA_SERIALSPDDENSESOLVER_H
00045 #define EPETRA_SERIALSPDDENSESOLVER_H
00046 #include "Epetra_SerialDenseSolver.h"
00047 class Epetra_SerialSymDenseMatrix;
00048 
00050 
00146 //=========================================================================
00147 class EPETRA_LIB_DLL_EXPORT Epetra_SerialSpdDenseSolver : public Epetra_SerialDenseSolver {
00148 
00149  public:
00151 
00152 
00153   Epetra_SerialSpdDenseSolver();
00154   
00155 
00157   virtual ~Epetra_SerialSpdDenseSolver();
00159 
00161 
00162 
00163   //Let the compiler know we intend to overload the SetMatrix function,
00164   //rather than hide it.
00165   using Epetra_SerialDenseSolver::SetMatrix;
00166 
00168   int SetMatrix(Epetra_SerialSymDenseMatrix & A_in);
00170   
00172 
00173 
00175 
00178   int Factor(void);
00179 
00181 
00184   int Solve(void);
00185 
00187 
00192   int Invert(void);
00193 
00195 
00198   int ComputeEquilibrateScaling(void);
00199 
00201 
00204   int EquilibrateMatrix(void);
00205 
00207 
00210   int EquilibrateRHS(void);
00211 
00212 
00214 
00217   int ApplyRefinement(void);
00218 
00220 
00223   int UnequilibrateLHS(void);
00224 
00226 
00232   int ReciprocalConditionEstimate(double & Value);
00234 
00236 
00237 
00238 
00240   bool ShouldEquilibrate() {ComputeEquilibrateScaling(); return(ShouldEquilibrate_);};
00242 
00244 
00245     
00247   Epetra_SerialSymDenseMatrix * SymMatrix()  const {return(SymMatrix_);};
00248        
00250   Epetra_SerialSymDenseMatrix * SymFactoredMatrix()  const {return(SymFactor_);};
00251 
00253 
00255   double SCOND() {return(SCOND_);};
00256 
00257   //Let the compiler know we intend to overload the AMAX function,
00258   //rather than hide it.
00259   using Epetra_SerialDenseSolver::AMAX;
00260 
00262   double AMAX() {return(AMAX_);};  
00264 
00265  private:
00266 
00267   double SCOND_;
00268   Epetra_SerialSymDenseMatrix * SymMatrix_; // Need pointer to symmetric matrix for Spd-specific methods
00269   Epetra_SerialSymDenseMatrix * SymFactor_; // Need pointer to symmetric matrix for Spd-specific methods
00270 
00271   // Epetra_SerialSpdDenseSolver copy constructor (put here because we don't want user access)
00272   
00273   Epetra_SerialSpdDenseSolver(const Epetra_SerialSpdDenseSolver& Source);
00274   Epetra_SerialSpdDenseSolver & operator=(const Epetra_SerialSpdDenseSolver& Source);
00275 };
00276 
00277 #endif /* EPETRA_SERIALSPDDENSESOLVER_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines