AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AbstractLinAlgPack_BasisSystemComposite.hpp
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
5 // Copyright (2003) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef BASIS_SYSTEM_COMPOSITE_STD_H
43 #define BASIS_SYSTEM_COMPOSITE_STD_H
44 
45 #include "AbstractLinAlgPack_BasisSystem.hpp"
46 #include "AbstractLinAlgPack_VectorSpace.hpp"
47 
48 namespace AbstractLinAlgPack {
49 
62 {
63 public:
64 
67 
74 
76 
79 
116  static void initialize_space_x(
117  const VectorSpace::space_ptr_t &space_xD
118  ,const VectorSpace::space_ptr_t &space_xI
119  ,Range1D *var_dep
122  );
123 
126  static const fcty_Gc_ptr_t factory_Gc();
127 
162  static void initialize_Gc(
164  ,const Range1D &var_dep
165  ,const Range1D &var_indep
167  ,const C_ptr_t &C
168  ,const N_ptr_t &N
169  ,MatrixOp *Gc
170  );
171 
186  static void get_C_N(
187  MatrixOp *Gc
188  ,MatrixOpNonsing **C
189  ,MatrixOp **N
190  );
191 
208  static void get_C_N(
209  const MatrixOp &Gc
210  ,const MatrixOpNonsing **C
211  ,const MatrixOp **N
212  );
213 
215 
218 
222 
231  );
232 
236  ,const Range1D &var_dep
237  ,const Range1D &var_indep
242  ,const mat_fcty_ptr_t &factory_D = Teuchos::null
243  );
244 
281  void initialize(
283  ,const Range1D &var_dep
284  ,const Range1D &var_indep
289  ,const mat_fcty_ptr_t &factory_D = Teuchos::null
290  );
291 
307  virtual void set_uninitialized();
308 
310 
313 
315  const VectorSpace::space_ptr_t& space_x() const;
317  const VectorSpace::space_ptr_t& space_c() const;
318 
320 
323 
329  virtual void update_D(
330  const MatrixOpNonsing &C
331  ,const MatrixOp &N
332  ,MatrixOp *D
333  ,EMatRelations mat_rel
334  ) const;
335 
337 
340 
342  const mat_nonsing_fcty_ptr_t factory_C() const;
344  const mat_fcty_ptr_t factory_D() const;
346  Range1D var_dep() const;
348  Range1D var_indep() const;
350  void update_basis(
351  const MatrixOp &Gc
352  ,MatrixOpNonsing *C
353  ,MatrixOp *D
354  ,MatrixOp *GcUP
355  ,EMatRelations mat_rel
356  ,std::ostream *out
357  ) const;
358 
360 
361 private:
362 
363 #ifndef DOXYGEN_COMPILE
364  VectorSpace::space_ptr_t space_x_;
365  Range1D var_dep_;
366  Range1D var_indep_;
367  VectorSpace::space_ptr_t space_c_;
368  mat_nonsing_fcty_ptr_t factory_C_;
369  mat_fcty_ptr_t factory_D_;
370 #endif
371 
372 }; // end class BasisSystemComposite
373 
374 } // end namespace AbstractPack
375 
376 #endif // BASIS_SYSTEM_COMPOSITE_STD_H
static void get_C_N(MatrixOp *Gc, MatrixOpNonsing **C, MatrixOp **N)
Get the non-const aggregate matrices C and N (or NULL pointers if not initialized).
Interface for the creation and maintainance of a basis matrix for a decomposition of linearlized cons...
static void initialize_Gc(const VectorSpace::space_ptr_t &space_x, const Range1D &var_dep, const Range1D &var_indep, const VectorSpace::space_ptr_t &space_c, const C_ptr_t &C, const N_ptr_t &N, MatrixOp *Gc)
Initialize the Gc matrix object given created from space_Gc()->create().
virtual void update_D(const MatrixOpNonsing &C, const MatrixOp &N, MatrixOp *D, EMatRelations mat_rel) const
Overridden by subclasses to update D if a specialized implementation is needed.
void update_basis(const MatrixOp &Gc, MatrixOpNonsing *C, MatrixOp *D, MatrixOp *GcUP, EMatRelations mat_rel, std::ostream *out) const
Teuchos::RCP< const Teuchos::AbstractFactory< MatrixOp > > fcty_Gc_ptr_t
static void initialize_space_x(const VectorSpace::space_ptr_t &space_xD, const VectorSpace::space_ptr_t &space_xI, Range1D *var_dep, Range1D *var_indep, VectorSpace::space_ptr_t *space_x)
Initialize the composite vector space for x = [ xD; xI ] as well as var_dep and var_indep.
Base class for all matrices that support basic matrix operations.
virtual const mat_sym_nonsing_fcty_ptr_t factory_S() const
Returns a matrix factory for the result of S = I + D'*D
void initialize(const VectorSpace::space_ptr_t &space_x, const Range1D &var_dep, const Range1D &var_indep, const VectorSpace::space_ptr_t &space_c, const mat_nonsing_fcty_ptr_t &factory_C, const mat_sym_fcty_ptr_t &factory_transDtD, const mat_sym_nonsing_fcty_ptr_t &factory_S, const mat_fcty_ptr_t &factory_D=Teuchos::null)
Initialize.
virtual const mat_sym_fcty_ptr_t factory_transDtD() const
Returns a matrix factory for the result of J = D'*D
Abstract base class for all nonsingular polymorphic matrices that can be used to compute matrix-vecto...
Simple BasisSystem subclass the case where the client sets up seperate C and N matrices.
static const fcty_Gc_ptr_t factory_Gc()
Return a matrix factory object for the composte Gc matrix object.