Thyra::DefaultMultiPeriodModelEvaluator< Scalar > Class Template Reference

Composite subclass that takes a list of individual ModelEvaluator objects and represents them as a single aggregate multi-period ModelEvalator object. More...

#include <Thyra_DefaultMultiPeriodModelEvaluator.hpp>

Inheritance diagram for Thyra::DefaultMultiPeriodModelEvaluator< Scalar >:

[legend]
List of all members.

Constructors/Intializers/Accessors

 DefaultMultiPeriodModelEvaluator ()
 
 DefaultMultiPeriodModelEvaluator (const int N, const Teuchos::RefCountPtr< ModelEvaluator< Scalar > > models[], const Scalar weights[], const Teuchos::RefCountPtr< const VectorBase< Scalar > > z[], const int z_index, const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &x_bar_space=Teuchos::null, const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &f_bar_space=Teuchos::null)
 
void initialize (const int N, const Teuchos::RefCountPtr< ModelEvaluator< Scalar > > models[], const Scalar weights[], const Teuchos::RefCountPtr< const VectorBase< Scalar > > z[], const int z_index, const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &x_bar_space=Teuchos::null, const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &f_bar_space=Teuchos::null)
 Initialize.

Public functions overridden from ModelEvaulator.

int Np () const
 
int Ng () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_x_space () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_f_space () const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_p_space (int l) const
 
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
get_g_space (int j) const
 
ModelEvaluatorBase::InArgs<
Scalar > 
getNominalValues () const
 
ModelEvaluatorBase::InArgs<
Scalar > 
getLowerBounds () const
 
ModelEvaluatorBase::InArgs<
Scalar > 
getUpperBounds () const
 
Teuchos::RefCountPtr< LinearOpWithSolveBase<
Scalar > > 
create_W () const
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_W_op () const
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_DfDp_op (int l) const
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_DgDx_op (int j) const
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
create_DgDp_op (int j, int l) const
 
ModelEvaluatorBase::InArgs<
Scalar > 
createInArgs () const
 
ModelEvaluatorBase::OutArgs<
Scalar > 
createOutArgs () const
 
void evalModel (const ModelEvaluatorBase::InArgs< Scalar > &inArgs, const ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
 
void reportFinalPoint (const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
 

Private Types

typedef std::vector< Teuchos::RefCountPtr<
ModelEvaluator< Scalar > > > 
models_t
typedef std::vector< Scalar > weights_t
typedef std::vector< Teuchos::RefCountPtr<
const VectorBase< Scalar > > > 
z_t

Private Attributes

models_t models_
weights_t weights_
z_t z_
int z_index_
Teuchos::RefCountPtr< ProductVectorSpaceBase<
Scalar > > 
x_bar_space_
Teuchos::RefCountPtr< ProductVectorSpaceBase<
Scalar > > 
f_bar_space_

Detailed Description

template<class Scalar>
class Thyra::DefaultMultiPeriodModelEvaluator< Scalar >

Composite subclass that takes a list of individual ModelEvaluator objects and represents them as a single aggregate multi-period ModelEvalator object.

This class represents fairly classic "composite" subclass that takes N ModelEvaluator objects and makes them appear to be just one.

Mathematically, this subclass is used to form a multi-period problem of the form:


   (x_bar,{p_l}\p_period) -> f_bar

   (x_bar,{p_l}\p_period) -> g_bar

 

where


   x_bar = [ x[0], x[1], ..., x[N-1]]

   {p_l}\p_period = { p_0, p_1, ..., p_{period-1}, p_{period+1}, ..., p_Np

   f_bar(...) = [ f[0](x[0],{p_l}), f[1](x[1],{p_l}), ..., f[N-1](x[N-1],{p_l}) ]

   g_bar(...) = sum( w[i]*g(x[0],{p_l}\p_period,p_peroid[i]), i = 0,...,N-1 )

 

Above, the notation {p_l} is meant to represent the set of all parameter subvectors in each of the constituent models minus the parameter used to define period data.

Also, above we use g(...) and g_bar(..) to represent the zeroth axillary response function unless otherwise noted.

This class could be made much more general but for now ...

Definition at line 78 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.


Member Typedef Documentation

template<class Scalar>
typedef std::vector<Teuchos::RefCountPtr<ModelEvaluator<Scalar> > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::models_t [private]
 

Definition at line 219 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
typedef std::vector<Scalar> Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::weights_t [private]
 

Definition at line 220 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
typedef std::vector<Teuchos::RefCountPtr<const VectorBase<Scalar> > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::z_t [private]
 

Definition at line 221 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::DefaultMultiPeriodModelEvaluator  ) 
 

Definition at line 241 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::DefaultMultiPeriodModelEvaluator const int  N,
const Teuchos::RefCountPtr< ModelEvaluator< Scalar > >  models[],
const Scalar  weights[],
const Teuchos::RefCountPtr< const VectorBase< Scalar > >  z[],
const int  z_index,
const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &  x_bar_space = Teuchos::null,
const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &  f_bar_space = Teuchos::null
 

Definition at line 246 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::initialize const int  N,
const Teuchos::RefCountPtr< ModelEvaluator< Scalar > >  models[],
const Scalar  weights[],
const Teuchos::RefCountPtr< const VectorBase< Scalar > >  z[],
const int  z_index,
const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &  x_bar_space = Teuchos::null,
const Teuchos::RefCountPtr< ProductVectorSpaceBase< Scalar > > &  f_bar_space = Teuchos::null
 

Initialize.

Parameters:
N [in] The number of periods.
models [in] Array (length N) of the constituent period models
weights [in] Array (length N) of the weights for the auxiliary response functions in the summation for g_bar(...) shown above.
z [in] Array (length N) of the period defining auxiliary paramter subvectors. If z==NULL then these are assumed to not be needed to define the period's model models[i]. Likewise, if z!=NULL but z[i].get()==NULL then it is assumed that models[i] does not need a parameter subvector to define its state.
z_index [in] Index of the model's parameter subvector that represents z[i]. In other words p_{z_index} == z[i]. This assumes that each model models[i] will have the same parameter subvector structure. z==NULL then this argument is ignored.
x_bar_space [in] The product vector space that represents the space for x_bar as defined above. If x_bar_space.get()==NULL then this will be created internally.
f_bar_space [in] The product vector space that represents the space for f_bar as defined above. If f_bar_space.get()==NULL then this will be created internally.
blockLOWSFF [in] Factory object that is used to create the block LOWS object that will be used to represent the block diagonal object. W_bar.
Preconditions:
  • N > 0
  • models!=NULL and models[i].get()!=NULL, for i=0...N-1.
  • [
  • z_index < 0] z==NULL
  • [z_index >= 0] z!=NULL and z[i].get()!=NULL, for i=0...N-1.

Definition at line 261 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
int Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::Np  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 309 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
int Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::Ng  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 316 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_x_space  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 324 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_f_space  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 332 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_p_space int  l  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 340 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_g_space int  j  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 348 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::getNominalValues  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 356 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::getLowerBounds  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 364 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::getUpperBounds  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 372 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpWithSolveBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::create_W  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 380 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::create_W_op  )  const [virtual]
 

.

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 388 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::create_DfDp_op int  l  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 396 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::create_DgDx_op int  j  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 404 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::create_DgDp_op int  j,
int  l
const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 412 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::createInArgs  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 420 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
ModelEvaluatorBase::OutArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::createOutArgs  )  const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 430 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
void Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::evalModel const ModelEvaluatorBase::InArgs< Scalar > &  inArgs,
const ModelEvaluatorBase::OutArgs< Scalar > &  outArgs
const [virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 439 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
void Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::reportFinalPoint const ModelEvaluatorBase::InArgs< Scalar > &  finalPoint,
const bool  wasSolved
[virtual]
 

Implements Thyra::ModelEvaluator< Scalar >.

Definition at line 448 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.


Member Data Documentation

template<class Scalar>
models_t Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::models_ [private]
 

Definition at line 226 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
weights_t Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::weights_ [private]
 

Definition at line 227 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
z_t Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::z_ [private]
 

Definition at line 228 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
int Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::z_index_ [private]
 

Definition at line 229 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr<ProductVectorSpaceBase<Scalar> > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::x_bar_space_ [private]
 

Definition at line 230 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.

template<class Scalar>
Teuchos::RefCountPtr<ProductVectorSpaceBase<Scalar> > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::f_bar_space_ [private]
 

Definition at line 231 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:33:12 2008 for Thyra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1