AbstractLinAlgPack_BasisSystemComposite.hpp

Go to the documentation of this file.
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 BASIS_SYSTEM_COMPOSITE_STD_H
00030 #define BASIS_SYSTEM_COMPOSITE_STD_H
00031 
00032 #include "AbstractLinAlgPack_BasisSystem.hpp"
00033 #include "AbstractLinAlgPack_VectorSpace.hpp"
00034 
00035 namespace AbstractLinAlgPack {
00036 
00047 class BasisSystemComposite
00048   : public AbstractLinAlgPack::BasisSystem
00049 {
00050 public:
00051 
00054 
00056   typedef Teuchos::RCP<const Teuchos::AbstractFactory<MatrixOp> >  fcty_Gc_ptr_t;
00058   typedef Teuchos::RCP<MatrixOpNonsing>                               C_ptr_t;
00060   typedef Teuchos::RCP<MatrixOp>                                      N_ptr_t;
00061 
00063 
00066 
00103   static void initialize_space_x(
00104     const VectorSpace::space_ptr_t    &space_xD
00105     ,const VectorSpace::space_ptr_t   &space_xI
00106     ,Range1D                          *var_dep
00107     ,Range1D                          *var_indep
00108     ,VectorSpace::space_ptr_t         *space_x
00109     );
00110 
00113   static const fcty_Gc_ptr_t factory_Gc();
00114   
00149   static void initialize_Gc(
00150     const VectorSpace::space_ptr_t    &space_x
00151     ,const Range1D                    &var_dep
00152     ,const Range1D                    &var_indep
00153     ,const VectorSpace::space_ptr_t   &space_c
00154     ,const C_ptr_t                    &C
00155     ,const N_ptr_t                    &N
00156     ,MatrixOp                         *Gc
00157     );
00158 
00173   static void get_C_N(
00174       MatrixOp               *Gc
00175     ,MatrixOpNonsing       **C
00176     ,MatrixOp              **N
00177     );
00178 
00195   static void get_C_N(
00196     const MatrixOp               &Gc
00197     ,const MatrixOpNonsing       **C
00198     ,const MatrixOp              **N
00199     );
00200 
00202 
00205 
00208   BasisSystemComposite();
00209 
00212   BasisSystemComposite(
00213     const VectorSpace::space_ptr_t       &space_x
00214     ,const VectorSpace::space_ptr_t      &space_c
00215     ,const mat_nonsing_fcty_ptr_t        &factory_C
00216     ,const mat_sym_fcty_ptr_t            &factory_transDtD
00217     ,const mat_sym_nonsing_fcty_ptr_t    &factory_S
00218     );
00219 
00221   BasisSystemComposite(
00222     const VectorSpace::space_ptr_t       &space_x
00223     ,const Range1D                       &var_dep
00224     ,const Range1D                       &var_indep
00225     ,const VectorSpace::space_ptr_t      &space_c
00226     ,const mat_nonsing_fcty_ptr_t        &factory_C
00227     ,const mat_sym_fcty_ptr_t            &factory_transDtD
00228     ,const mat_sym_nonsing_fcty_ptr_t    &factory_S
00229     ,const mat_fcty_ptr_t                &factory_D        = Teuchos::null
00230     );
00231   
00268   void initialize(
00269     const VectorSpace::space_ptr_t       &space_x
00270     ,const Range1D                       &var_dep
00271     ,const Range1D                       &var_indep
00272     ,const VectorSpace::space_ptr_t      &space_c
00273     ,const mat_nonsing_fcty_ptr_t        &factory_C
00274     ,const mat_sym_fcty_ptr_t            &factory_transDtD
00275     ,const mat_sym_nonsing_fcty_ptr_t    &factory_S
00276     ,const mat_fcty_ptr_t                &factory_D        = Teuchos::null
00277     );
00278 
00294   virtual void set_uninitialized();
00295 
00297 
00300 
00302   const VectorSpace::space_ptr_t& space_x() const;
00304   const VectorSpace::space_ptr_t& space_c() const;
00305 
00307 
00310 
00316   virtual void update_D(
00317     const MatrixOpNonsing       &C
00318     ,const MatrixOp             &N
00319     ,MatrixOp                   *D
00320     ,EMatRelations              mat_rel
00321     ) const;
00322 
00324 
00327 
00329   const mat_nonsing_fcty_ptr_t factory_C() const;
00331   const mat_fcty_ptr_t factory_D() const;
00333   Range1D var_dep() const;
00335   Range1D var_indep() const;
00337   void update_basis(
00338     const MatrixOp          &Gc
00339     ,MatrixOpNonsing        *C
00340     ,MatrixOp               *D
00341     ,MatrixOp               *GcUP
00342     ,EMatRelations          mat_rel
00343     ,std::ostream           *out
00344     ) const;
00345 
00347 
00348 private:
00349   
00350 #ifndef DOXYGEN_COMPILE
00351   VectorSpace::space_ptr_t   space_x_;
00352   Range1D                    var_dep_;
00353   Range1D                    var_indep_;
00354   VectorSpace::space_ptr_t   space_c_;
00355   mat_nonsing_fcty_ptr_t     factory_C_;
00356   mat_fcty_ptr_t             factory_D_;
00357 #endif
00358 
00359 }; // end class BasisSystemComposite
00360 
00361 } // end namespace AbstractPack
00362 
00363 #endif // BASIS_SYSTEM_COMPOSITE_STD_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:10:55 2011 for MOOCHO (Single Doxygen Collection) by  doxygen 1.6.3