MOOCHO (Single Doxygen Collection) Version of the Day
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
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 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.

Private Member Functions

void alloc_new_D_matrix (std::ostream *out, EOutputLevel olevel, Teuchos::RCP< MatrixOp > *D_ptr) const
 Allocate a new D_ptr matrix.
 DecompositionSystemVarReductImp (const DecompositionSystemVarReductImp &)
DecompositionSystemVarReductImpoperator= (const DecompositionSystemVarReductImp &)

Private Attributes

AbstractLinAlgPack::BasisSystembasis_sys
VectorSpace * space_x
VectorSpace * space_c
VectorSpace * space_range
VectorSpace * space_null

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
 

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 92 of file ConstrainedOptPack_DecompositionSystemVarReductImp.hpp.


Member Typedef Documentation


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 55 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

ConstrainedOptPack::DecompositionSystemVarReductImp::DecompositionSystemVarReductImp ( const DecompositionSystemVarReductImp ) [private]

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:

  • ToDo: Spell these out!

Postconditions:

  • ToDo: Spell these out!

Definition at line 70 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

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:

  • [this->D_imp() == MAT_IMP_IMPLICIT] D_ptr == NULL (throw std::invalid_argument)
  • [this->D_imp() == MAT_IMP_EXPLICIT] D_ptr != NULL (throw std::invalid_argument)

Postconditions:

  • C_ptr->get() != NULL
  • [this->D_imp() == MAT_IMP_EXPLICIT] D_ptr->get() != NULL

Definition at line 114 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:

  • C_ptr.get() != NULL (throw std::invalid_argument)
  • [this->D_imp() == MAT_IMP_IMPLICIT] D_ptr == NULL (throw std::invalid_argument)
  • [this->D_imp() == MAT_IMP_EXPLICIT] D_ptr != NULL (throw std::invalid_argument)
  • [this->D_imp() == MAT_IMP_EXPLICIT] D_ptr->get() != NULL (throw std::invalid_argument)

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 284 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 433 of file ConstrainedOptPack_DecompositionSystemVarReductImp.hpp.

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

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

Reimplemented from ConstrainedOptPack::DecompositionSystem.

Definition at line 306 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

size_type ConstrainedOptPack::DecompositionSystemVarReductImp::m ( ) const [virtual]
size_type ConstrainedOptPack::DecompositionSystemVarReductImp::r ( ) const [virtual]
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]
const DecompositionSystem::mat_fcty_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::factory_Uz ( ) const [virtual]
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 [virtual]

Preconditions:

  • this->space_x().get() != NULL (throw std::logic_error)
  • this->space_c().get() != NULL (throw std::logic_error)
  • [test_what == TEST] this->basis_sys_tester().get() != NULL (throw std::logic_error)

Implements ConstrainedOptPack::DecompositionSystem.

Definition at line 361 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

void ConstrainedOptPack::DecompositionSystemVarReductImp::print_update_decomp ( std::ostream &  out,
const std::string &  leading_str 
) const [virtual]
Range1D ConstrainedOptPack::DecompositionSystemVarReductImp::var_indep ( ) const [virtual]
Range1D ConstrainedOptPack::DecompositionSystemVarReductImp::var_dep ( ) const [virtual]
void ConstrainedOptPack::DecompositionSystemVarReductImp::update_D_imp_used ( EExplicitImplicit D_imp_used) const [protected, virtual]
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.

void ConstrainedOptPack::DecompositionSystemVarReductImp::alloc_new_D_matrix ( std::ostream *  out,
EOutputLevel  olevel,
Teuchos::RCP< MatrixOp > *  D_ptr 
) const [private]

Allocate a new D_ptr matrix.

Definition at line 672 of file ConstrainedOptPack_DecompositionSystemVarReductImp.cpp.

DecompositionSystemVarReductImp& ConstrainedOptPack::DecompositionSystemVarReductImp::operator= ( const DecompositionSystemVarReductImp ) [private]

Member Data Documentation

const VectorSpace::space_ptr_t & ConstrainedOptPack::DecompositionSystemVarReductImp::space_x [inline, private]
const VectorSpace::space_ptr_t & ConstrainedOptPack::DecompositionSystemVarReductImp::space_c [inline, private]
const VectorSpace::space_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::space_range [private]
const VectorSpace::space_ptr_t ConstrainedOptPack::DecompositionSystemVarReductImp::space_null [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines