ConstrainedOptPack::DecompositionSystemVarReductImp Class Reference

Specialization node implementation subclass of DecompositionSystem for variable reduction decompositions. More...

#include <ConstrainedOptPack_DecompositionSystemVarReductImp.hpp>

Inheritance diagram for ConstrainedOptPack::DecompositionSystemVarReductImp:

Inheritance graph
[legend]
List of all members.

Public types

typedef DecompositionSystem inherited
 
typedef Teuchos::RCP< const
BasisSystem > 
basis_sys_ptr_t
 

Constructors / initializers

 STANDARD_COMPOSITION_MEMBERS (BasisSystemTester, basis_sys_tester)
 Set the BasisSystem tester object.
 DecompositionSystemVarReductImp (const VectorSpace::space_ptr_t &space_x, const VectorSpace::space_ptr_t &space_c, const basis_sys_ptr_t &basis_sys, const basis_sys_tester_ptr_t &basis_sys_tester, EExplicitImplicit D_imp, EExplicitImplicit Uz_imp)
 Construct a variable reduction decomposition.

Access

const VectorSpace::space_ptr_t & space_x () const
 
const VectorSpace::space_ptr_t & space_c () const
 
const basis_sys_ptr_tbasis_sys () const
 

Basis manipulation

void get_basis_matrices (std::ostream *out, EOutputLevel olevel, ERunTests test_what, MatrixOp *Z, MatrixOp *Y, MatrixOpNonsing *R, MatrixOp *Uz, MatrixOp *Uy, Teuchos::RCP< MatrixOpNonsing > *C_ptr, Teuchos::RCP< MatrixOp > *D_ptr)
 Called by client to uninitialize decomposition matrices in prepairation for selecting a different basis.
void set_basis_matrices (std::ostream *out, EOutputLevel olevel, ERunTests test_what, const Teuchos::RCP< MatrixOpNonsing > &C_ptr, const Teuchos::RCP< MatrixOp > &D_ptr, MatrixOp *Uz, const basis_sys_ptr_t &basis_sys=Teuchos::null)
 Set updated basis matrices along with a possibly updated basis system object.
EExplicitImplicit D_imp_used () const
 Get the type of D matrix to be used or is being used (returns MAT_IMP_EXPLICIT or MAT_IMP_IMPLICIT only).

Overridden from DecompositionSystem

size_type n () const
 Returns this->space_x()->dim().
size_type m () const
 Returns this->space_c()->dim().
size_type r () const
 Returns this->basis_sys()->equ_decomp().size().
const VectorSpace::space_ptr_t space_range () const
 Returns this->space_x()->sub_space(var_dep).
const VectorSpace::space_ptr_t space_null () const
 Returns this->space_x()->sub_space(var_indep).
const mat_fcty_ptr_t factory_Z () const
 
const mat_fcty_ptr_t factory_Uz () const
 
void update_decomp (std::ostream *out, EOutputLevel olevel, ERunTests test_what, const MatrixOp &Gc, MatrixOp *Z, MatrixOp *Y, MatrixOpNonsing *R, MatrixOp *Uz, MatrixOp *Uy, EMatRelations mat_rel) const
 Preconditions:.
void print_update_decomp (std::ostream &out, const std::string &leading_str) const
 

Overridden from DecompositionSystemVarReduct

Range1D var_indep () const
 
Range1D var_dep () const
 

Public Member Functions

void initialize (const VectorSpace::space_ptr_t &space_x, const VectorSpace::space_ptr_t &space_c, const basis_sys_ptr_t &basis_sys)
 Initialize.

Protected Member Functions

virtual void update_D_imp_used (EExplicitImplicit *D_imp_used) const
 Update D_imp_used.
virtual mat_nonsing_fcty_ptr_t::element_type::obj_ptr_t uninitialize_matrices (std::ostream *out, EOutputLevel olevel, MatrixOp *Y, MatrixOpNonsing *R, MatrixOp *Uy) const =0
 Overridden by subclasses to uninitialized Y, R and Uy then return C if referenced.
virtual void initialize_matrices (std::ostream *out, EOutputLevel olevel, const mat_nonsing_fcty_ptr_t::element_type::obj_ptr_t &C_ptr, const mat_fcty_ptr_t::element_type::obj_ptr_t &D_ptr, MatrixOp *Y, MatrixOpNonsing *R, MatrixOp *Uy, EMatRelations mat_rel) const =0
 Overridden by subclasses to initialize Y, R and Uy given C and D.
virtual void print_update_matrices (std::ostream &out, const std::string &leading_str) const =0
 Print the sub-algorithm by which the matrices Y, R, Uy and Uy are updated.

Detailed Description

Specialization node implementation subclass of DecompositionSystem for variable reduction decompositions.

This interface abstracts a variable reduction decomposition where:

  Gc' = [ C  N ] 
        [ E  F ]

  Z   = [ D ]
        [ I ]

  Uz  = F + E * D

      where:
           C = Gc(var_dep,equ_decomp)'     [nonsingular]
           N = Gc(var_indep,equ_decomp)'
           E = Gc(var_dep,equ_undecomp)'
           F = Gc(var_indep,equ_undecomp)'
           D = -inv(C) * N
 

Above, C is a r x r nonsingular matrix. Subclasses define how Y is defined which in turn determines how R and Uy are defined.

The implementation of this subclass is completly determined by an aggregate BasisSytem object. Since the BasisSystem interface does not allow any permutations of the basis to be performed ???.

Subclass implementors notes:

It is up to subclasses to override factory_R() and factory_Uy() in order to define the types for R and Uy respectively.

ToDo: Finish documentation!

Definition at line 79 of file ConstrainedOptPack_DecompositionSystemVarReductImp.hpp.


Member Typedef Documentation

typedef DecompositionSystem ConstrainedOptPack::DecompositionSystemVarReductImp::inherited

Definition at line 86 of file ConstrainedOptPack_DecompositionSystemVarReductImp.hpp.

typedef Teuchos::RCP<const BasisSystem> ConstrainedOptPack::DecompositionSystemVarReductImp::basis_sys_ptr_t

Definition at line 88 of file ConstrainedOptPack_DecompositionSystemVarReductImp.hpp.


Constructor & Destructor Documentation

ConstrainedOptPack::DecompositionSystemVarReductImp::DecompositionSystemVarReductImp ( const VectorSpace::space_ptr_t &  space_x,
const VectorSpace::space_ptr_t &  space_c,
const basis_sys_ptr_t basis_sys,
const basis_sys_tester_ptr_t &  basis_sys_tester,
EExplicitImplicit  D_imp,
EExplicitImplicit  Uz_imp 
)

Construct a variable reduction decomposition.

Calls this->initialize().

Preconditions:

Postconditions:

Definition at line 42 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.


Member Function Documentation

ConstrainedOptPack::DecompositionSystemVarReductImp::STANDARD_COMPOSITION_MEMBERS ( BasisSystemTester  ,
basis_sys_tester   
)

Set the BasisSystem tester object.

void ConstrainedOptPack::DecompositionSystemVarReductImp::initialize ( const VectorSpace::space_ptr_t &  space_x,
const VectorSpace::space_ptr_t &  space_c,
const basis_sys_ptr_t basis_sys 
)

Initialize.

Parameters:
space_x [in] DVector space for variables x.
space_c [in] DVector space for general equalities c.
basis_sys [in] The BasisSystem object that defines the variable reduction that the decomposition is based on. This object must be fully initialized before this method is called. The object *basis_sys must not be altered while this is still using it. It is allowed for basis_sys.get() == NULL in which case this will not be fully initialized.
Preconditions:

Postconditions:

Definition at line 57 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

const VectorSpace::space_ptr_t& ConstrainedOptPack::DecompositionSystemVarReductImp::space_x (  )  const

const VectorSpace::space_ptr_t& ConstrainedOptPack::DecompositionSystemVarReductImp::space_c (  )  const

const basis_sys_ptr_t& ConstrainedOptPack::DecompositionSystemVarReductImp::basis_sys (  )  const

void ConstrainedOptPack::DecompositionSystemVarReductImp::get_basis_matrices ( std::ostream *  out,
EOutputLevel  olevel,
ERunTests  test_what,
MatrixOp *  Z,
MatrixOp *  Y,
MatrixOpNonsing *  R,
MatrixOp *  Uz,
MatrixOp *  Uy,
Teuchos::RCP< MatrixOpNonsing > *  C_ptr,
Teuchos::RCP< MatrixOp > *  D_ptr 
)

Called by client to uninitialize decomposition matrices in prepairation for selecting a different basis.

Parameters:
Z [in/out] On output, Z will have all references to C and D removed.
Y [in/out] On output, Y will have all references to C and D removed.
R [in/out] On output, R will have all references to C and D removed.
Uz [in/out] If this->Uz_imp() == MAT_IMP_IMPLICIT then on output, Uz will have all references to C and D removed. If this->Uz_imp() == MAT_IMP_EXPLICIT then Uz will be unaltered and it is expected that the client will initialize it properly before the next call to this->set_basis_matrices().
Uy [in/out] On output, Uy will have all references to C and D removed.
C_ptr [out] On output, C_ptr->get() != NULL will point to the basis matrix to be updated by the client before the next call to this->set_basis_matrices(). It is guarrenteed that *C_ptr->get() will not be referenced by any other entity so that changing the basis matrix object will not impact other objects in unexpected ways.
D_ptr [out] If this->D_imp() == MAT_IMP_IMPLICIT then on output, D_ptr == NULL must be true. If this->D_imp() == MAT_IMP_EXPLICIT then D_ptr->get() != NULL will point to the direct sensitivity matrix and it is expected that the client will initialize it properly before the next call to this->set_basis_matrices(). It is guarrenteed that *D_ptr->get() will not be referenced by any other entity so that changing the basis matrix object will not impact other objects in unexpected ways.
Preconditions:

Postconditions:

Definition at line 101 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

void ConstrainedOptPack::DecompositionSystemVarReductImp::set_basis_matrices ( std::ostream *  out,
EOutputLevel  olevel,
ERunTests  test_what,
const Teuchos::RCP< MatrixOpNonsing > &  C_ptr,
const Teuchos::RCP< MatrixOp > &  D_ptr,
MatrixOp *  Uz,
const basis_sys_ptr_t basis_sys = Teuchos::null 
)

Set updated basis matrices along with a possibly updated basis system object.

Parameters:
C_ptr [in] C_ptr.get() points to basis matrix object returned from this->uninitialize_matrices() which must be updated to current basis for current Jacobian matrices.
D_ptr [in] If this->D_imp() == MAT_IMP_EXPLICIT, then D_ptr->get() points to direct sensitivity matrix object returned from this->uninitialize_matrices() which must be updated to current basis for current Jacobian matrices. If this->D_imp() == MAT_IMP_IMPLICIT then D_ptr must be NULL.
Uz [in] If this->D_imp() == MAT_IMP_EXPLICIT, then Uz points to the projected sensitivity matrix Uz which must be updated for the current basis for the current Jacobian matrices. If this->Uz_imp() == MAT_IMP_IMPLICIT then Uz must be NULL.
basis_sys [in] If the basis system has changed then set basis_sys.get() != NULL to pass in this new basis system object.
Preconditions:

It is expected that immediatly after this method is called that this->updated_decomp() will be called to update the rest of the decomposition matrices for these basis matrices.

Definition at line 271 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

DecompositionSystemVarReductImp::EExplicitImplicit ConstrainedOptPack::DecompositionSystemVarReductImp::D_imp_used (  )  const [inline]

Get the type of D matrix to be used or is being used (returns MAT_IMP_EXPLICIT or MAT_IMP_IMPLICIT only).

Definition at line 420 of file ConstrainedOptPack_DecompositionSystemVarReductImp.hpp.

size_type ConstrainedOptPack::DecompositionSystemVarReductImp::n (  )  const [virtual]

Returns this->space_x()->dim().

Reimplemented from ConstrainedOptPack::DecompositionSystem.

Definition at line 293 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

size_type ConstrainedOptPack::DecompositionSystemVarReductImp::m (  )  const [virtual]

Returns this->space_c()->dim().

Implements ConstrainedOptPack::DecompositionSystem.

Definition at line 301 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

size_type ConstrainedOptPack::DecompositionSystemVarReductImp::r (  )  const [virtual]

Returns this->basis_sys()->equ_decomp().size().

Reimplemented from ConstrainedOptPack::DecompositionSystem.

Definition at line 309 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

const VectorSpace::space_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::space_range (  )  const [virtual]

Returns this->space_x()->sub_space(var_dep).

Implements ConstrainedOptPack::DecompositionSystem.

const VectorSpace::space_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::space_null (  )  const [virtual]

Returns this->space_x()->sub_space(var_indep).

Implements ConstrainedOptPack::DecompositionSystem.

const DecompositionSystem::mat_fcty_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::factory_Z (  )  const [virtual]

Implements ConstrainedOptPack::DecompositionSystem.

Definition at line 334 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

const DecompositionSystem::mat_fcty_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::factory_Uz (  )  const [virtual]

Implements ConstrainedOptPack::DecompositionSystem.

Definition at line 343 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

void ConstrainedOptPack::DecompositionSystemVarReductImp::update_decomp ( std::ostream *  out,
EOutputLevel  olevel,
ERunTests  test_what,
const MatrixOp &  Gc,
MatrixOp *  Z,
MatrixOp *  Y,
MatrixOpNonsing *  R,
MatrixOp *  Uz,
MatrixOp *  Uy,
EMatRelations  mat_rel 
) const

Preconditions:.

Definition at line 348 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

void ConstrainedOptPack::DecompositionSystemVarReductImp::print_update_decomp ( std::ostream &  out,
const std::string &  leading_str 
) const [virtual]

Implements ConstrainedOptPack::DecompositionSystem.

Definition at line 613 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

Range1D ConstrainedOptPack::DecompositionSystemVarReductImp::var_indep (  )  const [virtual]

Implements ConstrainedOptPack::DecompositionSystemVarReduct.

Definition at line 638 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

Range1D ConstrainedOptPack::DecompositionSystemVarReductImp::var_dep (  )  const [virtual]

Implements ConstrainedOptPack::DecompositionSystemVarReduct.

Definition at line 643 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

void ConstrainedOptPack::DecompositionSystemVarReductImp::update_D_imp_used ( EExplicitImplicit D_imp_used  )  const [protected, virtual]

Update D_imp_used.

Reimplemented in ConstrainedOptPack::DecompositionSystemOrthogonal.

Definition at line 650 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

virtual mat_nonsing_fcty_ptr_t::element_type::obj_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::uninitialize_matrices ( std::ostream *  out,
EOutputLevel  olevel,
MatrixOp *  Y,
MatrixOpNonsing *  R,
MatrixOp *  Uy 
) const [protected, pure virtual]

Overridden by subclasses to uninitialized Y, R and Uy then return C if referenced.

Note that the returned smart pointer to C may have return.has_ownership() == false in which case this will not be a shared resource with any other object (at least not on this level).

ToDo: Finish documentatation! `

Implemented in ConstrainedOptPack::DecompositionSystemCoordinate, and ConstrainedOptPack::DecompositionSystemOrthogonal.

virtual void ConstrainedOptPack::DecompositionSystemVarReductImp::initialize_matrices ( std::ostream *  out,
EOutputLevel  olevel,
const mat_nonsing_fcty_ptr_t::element_type::obj_ptr_t &  C_ptr,
const mat_fcty_ptr_t::element_type::obj_ptr_t &  D_ptr,
MatrixOp *  Y,
MatrixOpNonsing *  R,
MatrixOp *  Uy,
EMatRelations  mat_rel 
) const [protected, pure virtual]

Overridden by subclasses to initialize Y, R and Uy given C and D.

If C_ptr.has_ownership() == false, then the subclass implementation of this method will use clone_mwons() to clone it so that the output matrices are independent.

ToDo: Finish documentatation! `

Implemented in ConstrainedOptPack::DecompositionSystemCoordinate, and ConstrainedOptPack::DecompositionSystemOrthogonal.

virtual void ConstrainedOptPack::DecompositionSystemVarReductImp::print_update_matrices ( std::ostream &  out,
const std::string &  leading_str 
) const [protected, pure virtual]

Print the sub-algorithm by which the matrices Y, R, Uy and Uy are updated.

ToDo: Finish documentatation!

Implemented in ConstrainedOptPack::DecompositionSystemCoordinate, and ConstrainedOptPack::DecompositionSystemOrthogonal.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:51:12 2010 for ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization by  doxygen 1.4.7