|
AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization 00005 // Copyright (2003) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef ABSTRACT_LIN_ALG_PACK_BASIS_SYSTEM_H 00030 #define ABSTRACT_LIN_ALG_PACK_BASIS_SYSTEM_H 00031 00032 #include "AbstractLinAlgPack_Types.hpp" 00033 #include "Teuchos_AbstractFactory.hpp" 00034 #include "Teuchos_RCP.hpp" 00035 00036 namespace AbstractLinAlgPack { 00037 00215 class BasisSystem { 00216 public: 00217 00220 00222 typedef Teuchos::RCP< 00223 const Teuchos::AbstractFactory<MatrixOpNonsing> > mat_nonsing_fcty_ptr_t; 00225 typedef Teuchos::RCP< 00226 const Teuchos::AbstractFactory<MatrixOp> > mat_fcty_ptr_t; 00228 typedef Teuchos::RCP< 00229 const Teuchos::AbstractFactory<MatrixSymOp> > mat_sym_fcty_ptr_t; 00231 typedef Teuchos::RCP< 00232 const Teuchos::AbstractFactory<MatrixSymOpNonsing> > mat_sym_nonsing_fcty_ptr_t; 00234 class SingularBasis : public std::runtime_error 00235 {public: SingularBasis(const std::string& what_arg) : std::runtime_error(what_arg) {}}; 00237 enum EMatRelations { MATRICES_INDEP_IMPS, MATRICES_ALLOW_DEP_IMPS }; 00238 00240 00243 BasisSystem( 00244 const mat_sym_fcty_ptr_t &factory_transDtD 00245 ,const mat_sym_nonsing_fcty_ptr_t &factory_S 00246 ); 00247 00255 virtual void initialize( 00256 const mat_sym_fcty_ptr_t &factory_transDtD 00257 ,const mat_sym_nonsing_fcty_ptr_t &factory_S 00258 ); 00259 00261 virtual ~BasisSystem() {} 00262 00265 00268 virtual const mat_nonsing_fcty_ptr_t factory_C() const = 0; 00269 00275 virtual const mat_fcty_ptr_t factory_D() const = 0; 00276 00282 virtual const mat_fcty_ptr_t factory_GcUP() const; 00283 00293 virtual const mat_sym_fcty_ptr_t factory_transDtD() const; 00294 00303 virtual const mat_sym_nonsing_fcty_ptr_t factory_S() const; 00304 00306 00309 00321 virtual Range1D var_dep() const = 0; 00330 virtual Range1D var_indep() const = 0; 00338 virtual Range1D equ_decomp() const; 00346 virtual Range1D equ_undecomp() const; 00347 00349 00352 00431 virtual void update_basis( 00432 const MatrixOp &Gc 00433 ,MatrixOpNonsing *C 00434 ,MatrixOp *D 00435 ,MatrixOp *GcUP 00436 ,EMatRelations mat_rel = MATRICES_INDEP_IMPS 00437 ,std::ostream *out = NULL 00438 ) const = 0; 00439 00441 00442 private: 00443 mat_sym_fcty_ptr_t factory_transDtD_; 00444 mat_sym_nonsing_fcty_ptr_t factory_S_; 00445 00446 // not defined and not to be called 00447 BasisSystem(); 00448 00449 }; // end class BasisSystem 00450 00451 } // end namespace AbstractLinAlgPack 00452 00453 #endif // ABSTRACT_LIN_ALG_PACK_BASIS_SYSTEM_H
1.7.4