ModelEvaluator object and represents it as a single aggregate multi-period ModelEvalator object.
More...
#include <Thyra_DefaultMultiPeriodModelEvaluator.hpp>
Inheritance diagram for Thyra::DefaultMultiPeriodModelEvaluator< Scalar >:

Constructors/Intializers/Accessors | |
| DefaultMultiPeriodModelEvaluator () | |
| | |
| DefaultMultiPeriodModelEvaluator (const int N, const Array< RCP< ModelEvaluator< Scalar > > > &periodModels, const Array< int > &z_indexes, const Array< Array< RCP< const VectorBase< Scalar > > > > &z, const int g_index, const Array< Scalar > g_weights, const RCP< const ProductVectorSpaceBase< Scalar > > &x_bar_space=Teuchos::null, const RCP< const ProductVectorSpaceBase< Scalar > > &f_bar_space=Teuchos::null, const RCP< LinearOpWithSolveFactoryBase< Scalar > > &W_bar_factory=Teuchos::null) | |
Calls intialize(...). | |
| void | initialize (const int N, const Array< RCP< ModelEvaluator< Scalar > > > &periodModels, const Array< int > &z_indexes, const Array< Array< RCP< const VectorBase< Scalar > > > > &z, const int g_index, const Array< Scalar > g_weights, const RCP< const ProductVectorSpaceBase< Scalar > > &x_bar_space=Teuchos::null, const RCP< const ProductVectorSpaceBase< Scalar > > &f_bar_space=Teuchos::null, const RCP< LinearOpWithSolveFactoryBase< Scalar > > &W_bar_factory=Teuchos::null) |
| Initialize. | |
| void | reset_z (const Array< Array< RCP< const VectorBase< Scalar > > > > &z) |
| Reset z. | |
Public functions overridden from ModelEvaulator. | |
| int | Np () const |
| | |
| int | Ng () const |
| | |
| RCP< const VectorSpaceBase< Scalar > > | get_x_space () const |
| | |
| RCP< const VectorSpaceBase< Scalar > > | get_f_space () const |
| | |
| RCP< const VectorSpaceBase< Scalar > > | get_p_space (int l) const |
| | |
| RCP< const Array< std::string > > | get_p_names (int l) const |
| | |
| RCP< const VectorSpaceBase< Scalar > > | get_g_space (int j) const |
| | |
| ModelEvaluatorBase::InArgs< Scalar > | getNominalValues () const |
| | |
| ModelEvaluatorBase::InArgs< Scalar > | getLowerBounds () const |
| | |
| ModelEvaluatorBase::InArgs< Scalar > | getUpperBounds () const |
| | |
| RCP< LinearOpBase< Scalar > > | create_W_op () const |
| RCP< const LinearOpWithSolveFactoryBase< Scalar > > | get_W_factory () const |
| ModelEvaluatorBase::InArgs< Scalar > | createInArgs () const |
| | |
| void | reportFinalPoint (const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved) |
| Ignores the final point. | |
ModelEvaluator object and represents it as a single aggregate multi-period ModelEvalator object.
Mathematically, this subclass is used to form a multi-period (or multi-point) 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_(z_index-1), p_(z_index+1), ..., p_(Np-1) }
f_bar(...) = [ f(x[0],{p_l},z[0]); f(x[1],{p_l},z[1]); ..., f(x[N-1],{p_l},z[N-1]) ]
g_bar(...) = sum( g_weights[i]*g[g_index](x[0],{p_l},z[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 subvector used to define period data.
This gives the first derivative objects:
[ W[0], 0, ... 0 ]
[ 0, W[i], ... 0 ]
W_bar = DfDx_bar = [ ., ., ... . ]
[ 0, 0, ... W[N-1] ]
[ DfDp[0][l] ]
[ DfDp[1][l] ]
DfDp_bar[l] = [ ... ]
[ DfDp[N=1][l] ]
[ g_wieght[0] * DgDx_dot[0] ]
[ g_wieght[1] * DgDx_dot[1] ]
DgDx_dot_bar = [ ... ]
[ g_wieght[N-1] * DgDx_dot[N-1] ]
[ g_wieght[0] * DgDx[0] ]
[ g_wieght[1] * DgDx[1] ]
DgDx_bar = [ ... ]
[ g_wieght[N-1] * DgDx[N-1] ]
DgDp_bar = sum( g_weights[i]*DgDp[i][g_index], i = 0,...,N-1 )
This class could be made much more general but for now ???
Definition at line 115 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::DefaultMultiPeriodModelEvaluator | ( | ) |
| Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::DefaultMultiPeriodModelEvaluator | ( | const int | N, | |
| const Array< RCP< ModelEvaluator< Scalar > > > & | periodModels, | |||
| const Array< int > & | z_indexes, | |||
| const Array< Array< RCP< const VectorBase< Scalar > > > > & | z, | |||
| const int | g_index, | |||
| const Array< Scalar > | g_weights, | |||
| const RCP< const ProductVectorSpaceBase< Scalar > > & | x_bar_space = Teuchos::null, |
|||
| const RCP< const ProductVectorSpaceBase< Scalar > > & | f_bar_space = Teuchos::null, |
|||
| const RCP< LinearOpWithSolveFactoryBase< Scalar > > & | W_bar_factory = Teuchos::null | |||
| ) |
| void Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::initialize | ( | const int | N, | |
| const Array< RCP< ModelEvaluator< Scalar > > > & | periodModels, | |||
| const Array< int > & | z_indexes, | |||
| const Array< Array< RCP< const VectorBase< Scalar > > > > & | z, | |||
| const int | g_index, | |||
| const Array< Scalar > | g_weights, | |||
| const RCP< const ProductVectorSpaceBase< Scalar > > & | x_bar_space = Teuchos::null, |
|||
| const RCP< const ProductVectorSpaceBase< Scalar > > & | f_bar_space = Teuchos::null, |
|||
| const RCP< LinearOpWithSolveFactoryBase< Scalar > > & | W_bar_factory = Teuchos::null | |||
| ) |
Initialize.
| N | [in] The number of periods. | |
| periodModels | [in] Array (length N) of the period models. For now, each of the period models at periodModels[i] must have an identical structure for every input and output. The reason that different models are passed in is so that different behaviors of the output functions and different nominal values for each period's x and bounds can be specified. The nominal values from periodModels[0] will be used to set the nominal values for the non-peroid parameters. | |
| z_indexes | [in] Array of sorted zero-based indexes of the model's parameter subvector that represents z[i]. Note, this array must be sorted from smallest to largets and can not have any duplicate entires! | |
| z | [in] Array (length N) of the period defining auxiliary paramter subvectors. Each entry z[i] is an array of subvectors where z[i][k] is the subvector p(z_indexes[k]) in the underlying perild model. Therefore, the array z[i] must be ordered according to z_indexes. Note that z[i][k] is allowed to be null in which case the underlying default value for this parameter will be used. | |
| g_index | [in] The index of the response function that will be used for the period objective function. | |
| g_weights | [in] Array (length N) of the g_weights for the auxiliary response functions in the summation for g_bar(...) shown above. | |
| 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 a default version of this product space 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 a default version of this product space will be created internally. | |
| W_bar_factory | [in] Factory object that is used to create the block LOWS object that will be used to represent the block diagonal object W_bar. If is_null(W_bar_factory)==true on input then a DefaultBlockedTriangularLinearOpWithSolveFactory object will be created and used internally. |
N > 0 periodModels.size()==N. z_indexes[k] >= 0 and z_indexes[k] are sorted low to high and are unique. z.size()==N and z[i].size()==z_indexes.size(), for i=0...N-1 Definition at line 375 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| void Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::reset_z | ( | const Array< Array< RCP< const VectorBase< Scalar > > > > & | z | ) |
Reset z.
| z | [in] See initialize(). |
initialize() Definition at line 462 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| int Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::Np | ( | ) | const [virtual] |
Reimplemented from Thyra::ModelEvaluatorDefaultBase< Scalar >.
Definition at line 491 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| int Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::Ng | ( | ) | const [virtual] |
Reimplemented from Thyra::ModelEvaluatorDefaultBase< Scalar >.
Definition at line 498 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_x_space | ( | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 506 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_f_space | ( | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 514 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_p_space | ( | int | l | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 522 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| RCP< const Array< std::string > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_p_names | ( | int | l | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 530 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_g_space | ( | int | j | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 538 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::getNominalValues | ( | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 547 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::getLowerBounds | ( | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 555 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::getUpperBounds | ( | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 563 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| RCP< LinearOpBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::create_W_op | ( | ) | const [virtual] |
.
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 571 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| RCP< const LinearOpWithSolveFactoryBase< Scalar > > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::get_W_factory | ( | ) | const [virtual] |
.
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 588 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| ModelEvaluatorBase::InArgs< Scalar > Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::createInArgs | ( | ) | const [virtual] |
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 596 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
| void Thyra::DefaultMultiPeriodModelEvaluator< Scalar >::reportFinalPoint | ( | const ModelEvaluatorBase::InArgs< Scalar > & | finalPoint, | |
| const bool | wasSolved | |||
| ) | [virtual] |
Ignores the final point.
Implements Thyra::ModelEvaluator< Scalar >.
Definition at line 609 of file Thyra_DefaultMultiPeriodModelEvaluator.hpp.
1.4.7