ConstrainedOptPack_DecompositionSystemVarReductPermStd.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 DECOMPOSITION_SYSTEM_VAR_REDUCT_PERM_STD_H
00030 #define DECOMPOSITION_SYSTEM_VAR_REDUCT_PERM_STD_H
00031 
00032 #include <stdexcept>
00033 
00034 #include "ConstrainedOptPack_DecompositionSystemVarReductPerm.hpp"
00035 #include "AbstractLinAlgPack_VectorSpace.hpp"
00036 
00037 namespace ConstrainedOptPack {
00038 
00044 class DecompositionSystemVarReductPermStd : public DecompositionSystemVarReductPerm {
00045 public:
00046 
00049 
00051   typedef Teuchos::RCP<DecompositionSystemVarReductImp>    decomp_sys_imp_ptr_t;
00053   typedef Teuchos::RCP<BasisSystemPerm>                    basis_sys_ptr_t;
00054 
00056 
00059 
00061   DecompositionSystemVarReductPermStd(
00062     const decomp_sys_imp_ptr_t&        decomp_sys_imp  = Teuchos::null
00063     ,const basis_sys_ptr_t&            basis_sys       = Teuchos::null
00064     ,bool                              basis_selected  = false
00065     ,EExplicitImplicit                 D_imp           = MAT_IMP_AUTO
00066     ,EExplicitImplicit                 Uz_imp          = MAT_IMP_AUTO
00067     );
00068 
00070   void initialize(
00071     const decomp_sys_imp_ptr_t&        decomp_sys_imp
00072     ,const basis_sys_ptr_t&            basis_sys
00073     ,bool                              basis_selected  = false
00074     ,EExplicitImplicit                 D_imp           = MAT_IMP_AUTO
00075     ,EExplicitImplicit                 Uz_imp          = MAT_IMP_AUTO
00076     );
00077 
00079 
00082 
00084   const decomp_sys_imp_ptr_t& decomp_sys_imp() const;
00086   const basis_sys_ptr_t& basis_sys() const;
00087 
00089 
00092 
00094   size_type n() const;
00096   size_type m() const;
00098   size_type r() const;
00100   Range1D equ_decomp() const;
00102   Range1D equ_undecomp() const;
00104   const VectorSpace::space_ptr_t space_range() const;
00106   const VectorSpace::space_ptr_t space_null() const;
00108   const mat_fcty_ptr_t factory_Z() const;
00110   const mat_fcty_ptr_t factory_Y() const;
00112   const mat_nonsing_fcty_ptr_t factory_R() const;
00114   const mat_fcty_ptr_t factory_Uz() const;
00116   const mat_fcty_ptr_t factory_Uy() const;
00118   void update_decomp(
00119     std::ostream          *out
00120     ,EOutputLevel         olevel
00121     ,ERunTests            test_what
00122     ,const MatrixOp       &Gc
00123     ,MatrixOp             *Z
00124     ,MatrixOp             *Y
00125     ,MatrixOpNonsing      *R
00126     ,MatrixOp             *Uz
00127     ,MatrixOp             *Uy
00128     ,EMatRelations        mat_rel
00129     ) const;
00131   void print_update_decomp(
00132     std::ostream& out, const std::string& leading_str ) const;
00133 
00135 
00138 
00140   Range1D var_indep() const;
00142   Range1D var_dep() const;
00143 
00145 
00148 
00150   const perm_fcty_ptr_t   factory_P_var() const;
00152   const perm_fcty_ptr_t   factory_P_equ() const;
00154   bool has_basis() const;
00156   void set_decomp(
00157     std::ostream          *out
00158     ,EOutputLevel         olevel
00159     ,ERunTests            test_what
00160     ,const Permutation    &P_var
00161     ,const Range1D        &var_dep
00162     ,const Permutation    *P_equ
00163     ,const Range1D        *equ_decomp
00164     ,const MatrixOp       &Gc
00165     ,MatrixOp             *Z
00166     ,MatrixOp             *Y
00167     ,MatrixOpNonsing      *R
00168     ,MatrixOp             *Uz
00169     ,MatrixOp             *Uy
00170     ,EMatRelations        mat_rel
00171     );
00173   void select_decomp(
00174     std::ostream          *out
00175     ,EOutputLevel         olevel
00176     ,ERunTests            test_what
00177     ,const Vector         *nu
00178     ,MatrixOp             *Gc
00179     ,Permutation          *P_var
00180     ,Range1D              *var_dep
00181     ,Permutation          *P_equ
00182     ,Range1D              *equ_decomp
00183     ,MatrixOp             *Z
00184     ,MatrixOp             *Y
00185     ,MatrixOpNonsing      *R
00186     ,MatrixOp             *Uz
00187     ,MatrixOp             *Uy
00188     ,EMatRelations        mat_rel
00189     );
00190 
00192 
00193 private:
00194 
00195   // /////////////////////////
00196   // Private data members
00197 
00198   bool                        basis_selected_;  // True if a basis is currently selected
00199   decomp_sys_imp_ptr_t        decomp_sys_imp_;
00200   basis_sys_ptr_t             basis_sys_;
00201 
00202   // /////////////////////////
00203   // Private member functions
00204 
00206   void assert_basis_selected() const;
00207 
00208   // Not defined and not to be called!
00209   DecompositionSystemVarReductPermStd();
00210   DecompositionSystemVarReductPermStd(const DecompositionSystemVarReductPermStd&);
00211   DecompositionSystemVarReductPermStd& operator=(const DecompositionSystemVarReductPermStd&);
00212   
00213 };  // end class DecompositionSystemVarReductPermStd
00214 
00215 // ///////////////////////////////////////
00216 // Inline members
00217 
00218 inline
00219 const DecompositionSystemVarReductPermStd::decomp_sys_imp_ptr_t&
00220 DecompositionSystemVarReductPermStd::decomp_sys_imp() const
00221 {
00222   return decomp_sys_imp_;
00223 }
00224 
00225 inline
00226 const DecompositionSystemVarReductPermStd::basis_sys_ptr_t&
00227 DecompositionSystemVarReductPermStd::basis_sys() const
00228 {
00229   return basis_sys_;
00230 }
00231 
00232 } // end namespace ConstrainedOptPack
00233 
00234 #endif // DECOMPOSITION_SYSTEM_VAR_REDUCT_PERM_STD_H

Generated on Tue Oct 20 12:51:44 2009 for MOOCHO (Single Doxygen Collection) by doxygen 1.4.7