00001 // $Id: Anasazi_LOCA_Sort.H,v 1.14 2008/06/18 21:51:25 cgbaker Exp $ 00002 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/Anasazi_LOCA_Sort.H,v $ 00003 //@HEADER 00004 // ************************************************************************ 00005 // 00006 // NOX: An Object-Oriented Nonlinear Solver Package 00007 // Copyright (2002) Sandia Corporation 00008 // 00009 // LOCA: Library of Continuation Algorithms Package 00010 // Copyright (2005) Sandia Corporation 00011 // 00012 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00013 // license for use of this work by or on behalf of the U.S. Government. 00014 // 00015 // This library is free software; you can redistribute it and/or modify 00016 // it under the terms of the GNU Lesser General Public License as 00017 // published by the Free Software Foundation; either version 2.1 of the 00018 // License, or (at your option) any later version. 00019 // 00020 // This library is distributed in the hope that it will be useful, but 00021 // WITHOUT ANY WARRANTY; without even the implied warranty of 00022 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00023 // Lesser General Public License for more details. 00024 // 00025 // You should have received a copy of the GNU Lesser General Public 00026 // License along with this library; if not, write to the Free Software 00027 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00028 // USA 00029 // 00030 // Questions? Contact Roger Pawlowski (rppawlo@sandia.gov) or 00031 // Eric Phipps (etphipp@sandia.gov), Sandia National Laboratories. 00032 // ************************************************************************ 00033 // CVS Information 00034 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/Anasazi_LOCA_Sort.H,v $ 00035 // $Author: cgbaker $ 00036 // $Date: 2008/06/18 21:51:25 $ 00037 // $Revision: 1.14 $ 00038 // ************************************************************************ 00039 //@HEADER 00040 00041 #ifndef ANASAZI_LOCA_SORT_HPP 00042 #define ANASAZI_LOCA_SORT_HPP 00043 00044 #include "Teuchos_RCP.hpp" 00045 00046 #include "AnasaziSortManager.hpp" 00047 00048 // Forward declarations 00049 namespace NOX { 00050 namespace Abstract { 00051 class MultiVector; 00052 } 00053 } 00054 namespace LOCA { 00055 class GlobalData; 00056 namespace AnasaziOperator { 00057 class AbstractStrategy; 00058 } 00059 namespace EigenvalueSort { 00060 class AbstractStrategy; 00061 } 00062 } 00063 00064 namespace Anasazi { 00065 00070 class LOCASort : 00071 public Anasazi::SortManager< double > { 00072 00074 typedef NOX::Abstract::MultiVector MV; 00075 00077 typedef LOCA::AnasaziOperator::AbstractStrategy OP; 00078 00079 public: 00080 00082 00086 LOCASort(const Teuchos::RCP<LOCA::GlobalData>& global_data, 00087 const Teuchos::RCP<LOCA::EigenvalueSort::AbstractStrategy>& strategy_); 00088 00090 virtual ~LOCASort(); 00091 00093 00100 virtual void 00101 sort(std::vector<double>& evals, Teuchos::RCP<std::vector<int> > perm = Teuchos::null, int n = -1) const; 00102 00117 virtual void 00118 sort(std::vector<double>& r_evals, std::vector<double>& i_evals, Teuchos::RCP<std::vector<int> > perm = Teuchos::null, int n = -1) const; 00119 00120 protected: 00121 00123 Teuchos::RCP<LOCA::GlobalData> globalData; 00124 00126 Teuchos::RCP<LOCA::EigenvalueSort::AbstractStrategy> strategy; 00127 00128 }; // Class LOCASort 00129 00130 } // Namespace Anasazi 00131 00132 #endif // ANASAZI_LOCA_SORT_H 00133