|
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 // Redistribution and use in source and binary forms, with or without 00011 // modification, are permitted provided that the following conditions are 00012 // met: 00013 // 00014 // 1. Redistributions of source code must retain the above copyright 00015 // notice, this list of conditions and the following disclaimer. 00016 // 00017 // 2. Redistributions in binary form must reproduce the above copyright 00018 // notice, this list of conditions and the following disclaimer in the 00019 // documentation and/or other materials provided with the distribution. 00020 // 00021 // 3. Neither the name of the Corporation nor the names of the 00022 // contributors may be used to endorse or promote products derived from 00023 // this software without specific prior written permission. 00024 // 00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY 00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE 00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00036 // 00037 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 00038 // 00039 // *********************************************************************** 00040 // @HEADER 00041 00042 #ifndef BASIS_SYSTEM_COMPOSITE_STD_H 00043 #define BASIS_SYSTEM_COMPOSITE_STD_H 00044 00045 #include "AbstractLinAlgPack_BasisSystem.hpp" 00046 #include "AbstractLinAlgPack_VectorSpace.hpp" 00047 00048 namespace AbstractLinAlgPack { 00049 00060 class BasisSystemComposite 00061 : public AbstractLinAlgPack::BasisSystem 00062 { 00063 public: 00064 00067 00069 typedef Teuchos::RCP<const Teuchos::AbstractFactory<MatrixOp> > fcty_Gc_ptr_t; 00071 typedef Teuchos::RCP<MatrixOpNonsing> C_ptr_t; 00073 typedef Teuchos::RCP<MatrixOp> N_ptr_t; 00074 00076 00079 00116 static void initialize_space_x( 00117 const VectorSpace::space_ptr_t &space_xD 00118 ,const VectorSpace::space_ptr_t &space_xI 00119 ,Range1D *var_dep 00120 ,Range1D *var_indep 00121 ,VectorSpace::space_ptr_t *space_x 00122 ); 00123 00126 static const fcty_Gc_ptr_t factory_Gc(); 00127 00162 static void initialize_Gc( 00163 const VectorSpace::space_ptr_t &space_x 00164 ,const Range1D &var_dep 00165 ,const Range1D &var_indep 00166 ,const VectorSpace::space_ptr_t &space_c 00167 ,const C_ptr_t &C 00168 ,const N_ptr_t &N 00169 ,MatrixOp *Gc 00170 ); 00171 00186 static void get_C_N( 00187 MatrixOp *Gc 00188 ,MatrixOpNonsing **C 00189 ,MatrixOp **N 00190 ); 00191 00208 static void get_C_N( 00209 const MatrixOp &Gc 00210 ,const MatrixOpNonsing **C 00211 ,const MatrixOp **N 00212 ); 00213 00215 00218 00221 BasisSystemComposite(); 00222 00225 BasisSystemComposite( 00226 const VectorSpace::space_ptr_t &space_x 00227 ,const VectorSpace::space_ptr_t &space_c 00228 ,const mat_nonsing_fcty_ptr_t &factory_C 00229 ,const mat_sym_fcty_ptr_t &factory_transDtD 00230 ,const mat_sym_nonsing_fcty_ptr_t &factory_S 00231 ); 00232 00234 BasisSystemComposite( 00235 const VectorSpace::space_ptr_t &space_x 00236 ,const Range1D &var_dep 00237 ,const Range1D &var_indep 00238 ,const VectorSpace::space_ptr_t &space_c 00239 ,const mat_nonsing_fcty_ptr_t &factory_C 00240 ,const mat_sym_fcty_ptr_t &factory_transDtD 00241 ,const mat_sym_nonsing_fcty_ptr_t &factory_S 00242 ,const mat_fcty_ptr_t &factory_D = Teuchos::null 00243 ); 00244 00281 void initialize( 00282 const VectorSpace::space_ptr_t &space_x 00283 ,const Range1D &var_dep 00284 ,const Range1D &var_indep 00285 ,const VectorSpace::space_ptr_t &space_c 00286 ,const mat_nonsing_fcty_ptr_t &factory_C 00287 ,const mat_sym_fcty_ptr_t &factory_transDtD 00288 ,const mat_sym_nonsing_fcty_ptr_t &factory_S 00289 ,const mat_fcty_ptr_t &factory_D = Teuchos::null 00290 ); 00291 00307 virtual void set_uninitialized(); 00308 00310 00313 00315 const VectorSpace::space_ptr_t& space_x() const; 00317 const VectorSpace::space_ptr_t& space_c() const; 00318 00320 00323 00329 virtual void update_D( 00330 const MatrixOpNonsing &C 00331 ,const MatrixOp &N 00332 ,MatrixOp *D 00333 ,EMatRelations mat_rel 00334 ) const; 00335 00337 00340 00342 const mat_nonsing_fcty_ptr_t factory_C() const; 00344 const mat_fcty_ptr_t factory_D() const; 00346 Range1D var_dep() const; 00348 Range1D var_indep() const; 00350 void update_basis( 00351 const MatrixOp &Gc 00352 ,MatrixOpNonsing *C 00353 ,MatrixOp *D 00354 ,MatrixOp *GcUP 00355 ,EMatRelations mat_rel 00356 ,std::ostream *out 00357 ) const; 00358 00360 00361 private: 00362 00363 #ifndef DOXYGEN_COMPILE 00364 VectorSpace::space_ptr_t space_x_; 00365 Range1D var_dep_; 00366 Range1D var_indep_; 00367 VectorSpace::space_ptr_t space_c_; 00368 mat_nonsing_fcty_ptr_t factory_C_; 00369 mat_fcty_ptr_t factory_D_; 00370 #endif 00371 00372 }; // end class BasisSystemComposite 00373 00374 } // end namespace AbstractPack 00375 00376 #endif // BASIS_SYSTEM_COMPOSITE_STD_H
1.7.6.1