MoochoPack::NLPAlgoState Class Reference

Reduced space SQP state encapsulation interface. More...

#include <MoochoPack_NLPAlgoState.hpp>

Inheritance diagram for MoochoPack::NLPAlgoState:

[legend]
List of all members.

Public Types

typedef Teuchos::RCP< const
VectorSpace
vec_space_ptr_t
 

Constructors/initializers

 STANDARD_COMPOSITION_MEMBERS (DecompositionSystem, decomp_sys)
 Set the DecompositionSystem object that all share.
 STANDARD_CONST_COMPOSITION_MEMBERS (VectorSpace, space_x)
 Set the VectorSpace of x.
 STANDARD_CONST_COMPOSITION_MEMBERS (VectorSpace, space_c)
 Set the VectorSpace of c.
void set_space_range (const vec_space_ptr_t &space_range)
 Set the VectorSpace of the range space (py).
vec_space_ptr_tget_space_range ()
const vec_space_ptr_tget_space_range () const
const VectorSpacespace_range () const
void set_space_null (const vec_space_ptr_t &space_null)
 Set the VectorSpace of the null space (pz).
vec_space_ptr_tget_space_null ()
const vec_space_ptr_tget_space_null () const
const VectorSpacespace_null () const
 NLPAlgoState (const decomp_sys_ptr_t &decomp_sys=Teuchos::null, const vec_space_ptr_t &space_x=Teuchos::null, const vec_space_ptr_t &space_c=Teuchos::null, const vec_space_ptr_t &space_range=Teuchos::null, const vec_space_ptr_t &space_null=Teuchos::null)
 Construct.
virtual ~NLPAlgoState ()
 

Decomposition information

nu: Difference between Lagrange multipiers for the upper and lower bounds ( n x 1 )

 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, var_dep)
 Range of dependent variables [1,r].
 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, var_indep)
 Range of independent varaibles [r+1,n].
 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, equ_decomp)
 Range of decomposed equality constraints [1,r].
 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, equ_undecomp)
 Range of undecomposed equality constraints [r+1,m].

Basis Pivot Info (variable reduction decompositions only)

 STANDARD_COMPOSITION_MEMBERS (Permutation, P_var_current)
 Current permutation for variables.
 STANDARD_COMPOSITION_MEMBERS (Permutation, P_var_last)
 Previous permutation for variables.
 STANDARD_COMPOSITION_MEMBERS (Permutation, P_equ_current)
 Current permutation for equality constraints.
 STANDARD_COMPOSITION_MEMBERS (Permutation, P_equ_last)
 Previous permutation for equality constraints.

Protected Types

 NUM_VEC_SPACE_TYPES = 5
 VST_SPACE_X = 0
 VST_SPACE_C = 1
 VST_SPACE_RANGE = 2
 VST_SPACE_NULL = 3
enum  { NUM_VEC_SPACE_TYPES = 5 }
enum  EVecSpaceType { VST_SPACE_X = 0, VST_SPACE_C = 1, VST_SPACE_RANGE = 2, VST_SPACE_NULL = 3 }

Protected Member Functions

void update_iq_id (const std::string &iq_name, iq_id_encap *iq_id) const
 
void update_index_type_iq_id (const std::string &iq_name, iq_id_encap *iq_id)
 
void update_value_type_iq_id (const std::string &iq_name, iq_id_encap *iq_id)
 
void update_vector_iq_id (const std::string &iq_name, const VectorSpace::space_ptr_t &vec_space, EVecSpaceType vec_space_type, iq_id_encap *iq_id)
 

Private Types

typedef std::deque< iq_id_typeiq_vector_list_t

Private Member Functions

void update_vector_factories (EVecSpaceType vec_space_type, const vec_space_ptr_t &vec_space)
 NLPAlgoState (const NLPAlgoState &)
NLPAlgoStateoperator= (const NLPAlgoState &)

Private Attributes

vec_space_ptr_t space_range_
vec_space_ptr_t space_null_
iq_vector_list_t vector_iqs_lists_ [NUM_VEC_SPACE_TYPES]

Classes

class  InvalidType
 Thrown if an iteration quantity is of an invalid type. More...
struct  iq_id_encap
  More...

Detailed Description

Reduced space SQP state encapsulation interface.

This in an interface to a set of data specific to a reduced space SQP algorithms. The iteration quantites are abstracted within IterQuantityAccess<> objects. A set of boilerplate macros are used to add the necessary declarations and implemetations of these iteration quantity access functions. As shown by these macros the access methods are declared virtual so that subclasses can override these methods. Otherwise, much of these could have been declared inline.

The implementation defined in this class uses IterQuantityAccessContiguous<> for iteration quantities of type index_type, value_type and VectorMutable with a default of one storage location. The default implementation is able to create the VectorMutable iteration quantities by using VectorSpace objects that the client sets this up with.

For all other types of iteration quantities (i.e. MatrixOp etc.) the client is responsible for setting the iteration quantity object of type IterQuantityAccess<>. The client can also change the type of class used for any iteration quantity by simply calling AlgorithmState::set_iter_quant(...).

The number of storage locations for any iteration quantity of type IterQuantityAccessContiguous<> can be changed by fetching the iteration quantity using the access methods defined here and then using dynamic_cast<> and calling the IterQuantityAccessContiguous<>::resize(...) method.

Note that the underlying AlgorithmState object will not know about the iteration quantity objects with default implementations until the access functions have been called at least once.

ToDo: Finish documentation.

Definition at line 251 of file MoochoPack_NLPAlgoState.hpp.


Member Typedef Documentation

typedef Teuchos::RCP<const VectorSpace> MoochoPack::NLPAlgoState::vec_space_ptr_t

Definition at line 264 of file MoochoPack_NLPAlgoState.hpp.

typedef std::deque<iq_id_type> MoochoPack::NLPAlgoState::iq_vector_list_t [private]

Definition at line 514 of file MoochoPack_NLPAlgoState.hpp.


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
NUM_VEC_SPACE_TYPES 

Definition at line 472 of file MoochoPack_NLPAlgoState.hpp.

enum MoochoPack::NLPAlgoState::EVecSpaceType [protected]

Enumerator:
VST_SPACE_X 
VST_SPACE_C 
VST_SPACE_RANGE 
VST_SPACE_NULL 

Definition at line 473 of file MoochoPack_NLPAlgoState.hpp.


Constructor & Destructor Documentation

MoochoPack::NLPAlgoState::NLPAlgoState ( const decomp_sys_ptr_t &  decomp_sys = Teuchos::null,
const vec_space_ptr_t space_x = Teuchos::null,
const vec_space_ptr_t space_c = Teuchos::null,
const vec_space_ptr_t space_range = Teuchos::null,
const vec_space_ptr_t space_null = Teuchos::null 
)

Construct.

Initializes num_basis() == 0

Definition at line 102 of file MoochoPack_NLPAlgoState.cpp.

virtual MoochoPack::NLPAlgoState::~NLPAlgoState (  )  [inline, virtual]

Definition at line 327 of file MoochoPack_NLPAlgoState.hpp.

MoochoPack::NLPAlgoState::NLPAlgoState ( const NLPAlgoState  )  [private]


Member Function Documentation

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( DecompositionSystem  ,
decomp_sys   
)

Set the DecompositionSystem object that all share.

MoochoPack::NLPAlgoState::STANDARD_CONST_COMPOSITION_MEMBERS ( VectorSpace  ,
space_x   
)

Set the VectorSpace of x.

MoochoPack::NLPAlgoState::STANDARD_CONST_COMPOSITION_MEMBERS ( VectorSpace  ,
space_c   
)

Set the VectorSpace of c.

void MoochoPack::NLPAlgoState::set_space_range ( const vec_space_ptr_t space_range  ) 

Set the VectorSpace of the range space (py).

Calling this method will cause all of the vector iteration quantity objects set in this space to be updated with this vector space (factory) object.

Definition at line 90 of file MoochoPack_NLPAlgoState.cpp.

NLPAlgoState::vec_space_ptr_t & MoochoPack::NLPAlgoState::get_space_range (  )  [inline]

Definition at line 544 of file MoochoPack_NLPAlgoState.hpp.

const NLPAlgoState::vec_space_ptr_t & MoochoPack::NLPAlgoState::get_space_range (  )  const [inline]

Definition at line 548 of file MoochoPack_NLPAlgoState.hpp.

const VectorSpace & MoochoPack::NLPAlgoState::space_range (  )  const [inline]

Definition at line 552 of file MoochoPack_NLPAlgoState.hpp.

void MoochoPack::NLPAlgoState::set_space_null ( const vec_space_ptr_t space_null  ) 

Set the VectorSpace of the null space (pz).

Calling this method will cause all of the vector iteration quantity objects set in this space to be updated with this vector space (factory) object.

Definition at line 96 of file MoochoPack_NLPAlgoState.cpp.

NLPAlgoState::vec_space_ptr_t & MoochoPack::NLPAlgoState::get_space_null (  )  [inline]

Definition at line 556 of file MoochoPack_NLPAlgoState.hpp.

const NLPAlgoState::vec_space_ptr_t & MoochoPack::NLPAlgoState::get_space_null (  )  const [inline]

Definition at line 560 of file MoochoPack_NLPAlgoState.hpp.

const VectorSpace & MoochoPack::NLPAlgoState::space_null (  )  const [inline]

Definition at line 564 of file MoochoPack_NLPAlgoState.hpp.

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
var_dep   
)

Range of dependent variables [1,r].

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
var_indep   
)

Range of independent varaibles [r+1,n].

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
equ_decomp   
)

Range of decomposed equality constraints [1,r].

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
equ_undecomp   
)

Range of undecomposed equality constraints [r+1,m].

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_var_current   
)

Current permutation for variables.

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_var_last   
)

Previous permutation for variables.

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_equ_current   
)

Current permutation for equality constraints.

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_equ_last   
)

Previous permutation for equality constraints.

void MoochoPack::NLPAlgoState::update_iq_id ( const std::string &  iq_name,
iq_id_encap iq_id 
) const [protected]

void MoochoPack::NLPAlgoState::update_index_type_iq_id ( const std::string &  iq_name,
iq_id_encap iq_id 
) [protected]

Definition at line 188 of file MoochoPack_NLPAlgoState.cpp.

void MoochoPack::NLPAlgoState::update_value_type_iq_id ( const std::string &  iq_name,
iq_id_encap iq_id 
) [protected]

Definition at line 218 of file MoochoPack_NLPAlgoState.cpp.

void MoochoPack::NLPAlgoState::update_vector_iq_id ( const std::string &  iq_name,
const VectorSpace::space_ptr_t &  vec_space,
EVecSpaceType  vec_space_type,
iq_id_encap iq_id 
) [protected]

Definition at line 248 of file MoochoPack_NLPAlgoState.cpp.

void MoochoPack::NLPAlgoState::update_vector_factories ( EVecSpaceType  vec_space_type,
const vec_space_ptr_t vec_space 
) [private]

Definition at line 281 of file MoochoPack_NLPAlgoState.cpp.

NLPAlgoState& MoochoPack::NLPAlgoState::operator= ( const NLPAlgoState  )  [private]


Member Data Documentation

vec_space_ptr_t MoochoPack::NLPAlgoState::space_range_ [private]

Definition at line 519 of file MoochoPack_NLPAlgoState.hpp.

vec_space_ptr_t MoochoPack::NLPAlgoState::space_null_ [private]

Definition at line 520 of file MoochoPack_NLPAlgoState.hpp.

iq_vector_list_t MoochoPack::NLPAlgoState::vector_iqs_lists_[NUM_VEC_SPACE_TYPES] [private]

Definition at line 522 of file MoochoPack_NLPAlgoState.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Oct 20 12:54:15 2009 for MOOCHO (Single Doxygen Collection) by doxygen 1.4.7