EpetraExt_ModelEvaluator.cpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //     EpetraExt: Epetra Extended - Linear Algebra Services Package
00005 //                 Copyright (2001) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #include "EpetraExt_ModelEvaluator.h"
00030 #include "Teuchos_implicit_cast.hpp"
00031 
00032 
00033 namespace EpetraExt {
00034 
00035 
00036 //
00037 // ModelEvaluator::InArgs
00038 //
00039 
00040 
00041 ModelEvaluator::InArgs::InArgs()
00042   :modelEvalDescription_("WARNING!  THIS INARGS OBJECT IS UNINITALIZED!")
00043 {
00044   std::fill_n(&supports_[0],NUM_E_IN_ARGS_MEMBERS,false);
00045   t_     = 0.0;
00046   alpha_ = 0.0;
00047   beta_  = 0.0;
00048 }
00049 
00050 
00051 bool ModelEvaluator::InArgs::supports(EInArgsMembers arg) const
00052 {
00053   TEST_FOR_EXCEPTION(
00054     int(arg)>=NUM_E_IN_ARGS_MEMBERS || int(arg) < 0,std::logic_error
00055     ,"model = \'"<<modelEvalDescription_<<"\': Error, arg="<<toString(arg)<<" is invalid!"
00056     );
00057   return supports_[arg];
00058 }
00059 
00060 
00061 void ModelEvaluator::InArgs::_setSupports( EInArgsMembers arg, bool supports )
00062 {
00063   TEST_FOR_EXCEPTION(
00064     int(arg)>=NUM_E_IN_ARGS_MEMBERS || int(arg) < 0,std::logic_error
00065     ,"model = \'"<<modelEvalDescription_<<"\':Error, arg="<<toString(arg)<<" is invalid!"
00066     );
00067   supports_[arg] = supports;
00068 }
00069 
00070 
00071 void ModelEvaluator::InArgs::assert_supports(EInArgsMembers arg) const
00072 {
00073   TEST_FOR_EXCEPTION(
00074     !supports_[arg], std::logic_error
00075     ,"EpetraExt::ModelEvaluator::InArgs::assert_supports(arg): model = \'"<<modelEvalDescription_<<"\': Error, "
00076     "The argument arg = " << toString(arg) << " is not supported!"
00077     );
00078 }
00079 
00080 
00081 void ModelEvaluator::InArgs::assert_l(int l) const
00082 {
00083   TEST_FOR_EXCEPTION(
00084     !( 0 <= l && l < Np() ), std::logic_error
00085     ,"EpetraExt::ModelEvaluator::InArgs::assert_l(l): model = \'"<<modelEvalDescription_<<"\': Error, "
00086     "The parameter l = " << l << " is not in the range [0,"<<Np()-1<<"]!"
00087     );
00088 }
00089 
00090 
00091 //
00092 // ModelEvaluator::OutArgs
00093 //
00094 
00095 
00096 ModelEvaluator::OutArgs::OutArgs()
00097   :modelEvalDescription_("WARNING!  THIS OUTARGS OBJECT IS UNINITALIZED!")
00098 {
00099   std::fill_n(&supports_[0],NUM_E_OUT_ARGS_MEMBERS,false);
00100 }
00101 
00102 
00103 bool ModelEvaluator::OutArgs::supports(EOutArgsMembers arg) const
00104 {
00105   TEST_FOR_EXCEPTION(
00106     int(arg)>=NUM_E_OUT_ARGS_MEMBERS || int(arg) < 0,std::logic_error
00107     ,"model = \'"<<modelEvalDescription_<<"\': Error, arg="<<toString(arg)<<" is invalid!"
00108     );
00109   return supports_[arg];
00110 }
00111 
00112 
00113 const ModelEvaluator::DerivativeSupport&
00114 ModelEvaluator::OutArgs::supports(EOutArgsDfDp arg, int l) const
00115 {
00116   assert_l(l);
00117   return supports_DfDp_[l];
00118 }
00119 
00120 
00121 const ModelEvaluator::DerivativeSupport&
00122 ModelEvaluator::OutArgs::supports(EOutArgsDgDx_dot arg, int j) const
00123 {
00124   assert_j(j);
00125   return supports_DgDx_dot_[j];
00126 }
00127 
00128 
00129 const ModelEvaluator::DerivativeSupport&
00130 ModelEvaluator::OutArgs::supports(EOutArgsDgDx arg, int j) const
00131 {
00132   assert_j(j);
00133   return supports_DgDx_[j];
00134 }
00135 
00136 
00137 const ModelEvaluator::DerivativeSupport&
00138 ModelEvaluator::OutArgs::supports(EOutArgsDgDp arg, int j, int l) const
00139 {
00140   assert_j(j);
00141   assert_l(l);
00142   return supports_DgDp_[ j*Np() + l ];
00143 }
00144 
00145 
00146 bool ModelEvaluator::OutArgs::funcOrDerivesAreSet(EOutArgsMembers arg) const
00147 {
00148   using Teuchos::implicit_cast;
00149   bool areSet = false;
00150   switch(arg) {
00151     case OUT_ARG_f: {
00152       if (!is_null(f_)) areSet = true;
00153       if (!is_null(W_)) areSet = true;
00154       for ( int l = 0; l < implicit_cast<int>(DfDp_.size()); ++l )
00155         if(!DfDp_[l].isEmpty()) areSet = true;
00156       break;
00157     }
00158     default:
00159       TEST_FOR_EXCEPTION(true,std::logic_error,
00160         "ModelEvaluator::OutArgs::funcOrDerivesAreSet(arg): Error, we can not handle"
00161         " the argument " << toString(arg) << "yet!");
00162   }
00163   return areSet;
00164 }
00165 
00166 
00167 void ModelEvaluator::OutArgs::_setModelEvalDescription( const std::string &modelEvalDescription )
00168 {
00169   modelEvalDescription_ = modelEvalDescription;
00170 }
00171 
00172 
00173 void ModelEvaluator::OutArgs::_set_Np_Ng(int Np, int Ng)
00174 {
00175   if(Np) {
00176     supports_DfDp_.resize(Np);
00177     DfDp_.resize(Np);
00178     std::fill_n(DfDp_.begin(),Np,Derivative());
00179     DfDp_properties_.resize(Np);
00180     std::fill_n(DfDp_properties_.begin(),Np,DerivativeProperties());
00181   }
00182   if(Ng) {
00183     g_.resize(Ng);
00184     supports_DgDx_dot_.resize(Ng);
00185     DgDx_dot_.resize(Ng);
00186     std::fill_n(DgDx_dot_.begin(),Ng,Derivative());
00187     DgDx_dot_properties_.resize(Ng);
00188     std::fill_n(DgDx_dot_properties_.begin(),Ng,DerivativeProperties());
00189     supports_DgDx_.resize(Ng);
00190     DgDx_.resize(Ng);
00191     std::fill_n(DgDx_.begin(),Ng,Derivative());
00192     DgDx_properties_.resize(Ng);
00193     std::fill_n(DgDx_properties_.begin(),Ng,DerivativeProperties());
00194   }
00195   if(Np && Ng) {
00196     const int NpNg = Np*Ng;
00197     supports_DgDp_.resize(NpNg);
00198     DgDp_.resize(NpNg);
00199     std::fill_n(DgDp_.begin(),NpNg,Derivative());
00200     DgDp_properties_.resize(NpNg);
00201     std::fill_n(DgDp_properties_.begin(),NpNg,DerivativeProperties());
00202   }
00203 }
00204 
00205 
00206 void ModelEvaluator::OutArgs::_setSupports( EOutArgsMembers arg, bool supports )
00207 {
00208   TEST_FOR_EXCEPTION(
00209     int(arg)>=NUM_E_OUT_ARGS_MEMBERS || int(arg) < 0,std::logic_error
00210     ,"model = \'"<<modelEvalDescription_<<"\': Error, arg="<<toString(arg)<<" is invalid!"
00211     );
00212   supports_[arg] = supports;
00213 }
00214 
00215 
00216 void ModelEvaluator::OutArgs::_setSupports( EOutArgsDfDp arg, int l, const DerivativeSupport& supports )
00217 {
00218   assert_l(l);
00219   supports_DfDp_[l] = supports;
00220 }
00221 
00222 
00223 void ModelEvaluator::OutArgs::_setSupports( EOutArgsDgDx_dot arg, int j, const DerivativeSupport& supports )
00224 {
00225   assert_j(j);
00226   supports_DgDx_dot_[j] = supports;
00227 }
00228 
00229 
00230 void ModelEvaluator::OutArgs::_setSupports( EOutArgsDgDx arg, int j, const DerivativeSupport& supports )
00231 {
00232   assert_j(j);
00233   supports_DgDx_[j] = supports;
00234 }
00235 
00236 
00237 void ModelEvaluator::OutArgs::_setSupports( EOutArgsDgDp arg, int j, int l, const DerivativeSupport& supports )
00238 {
00239   assert_j(j);
00240   assert_l(l);
00241   supports_DgDp_[ j*Np() + l ] = supports;
00242 }
00243 
00244 
00245 void ModelEvaluator::OutArgs::_set_W_properties( const DerivativeProperties &W_properties )
00246 {
00247   W_properties_ = W_properties;
00248 }
00249 
00250 
00251 void ModelEvaluator::OutArgs::_set_DfDp_properties( int l, const DerivativeProperties &properties )
00252 {
00253   assert_supports(OUT_ARG_DfDp,l);
00254   DfDp_properties_[l] = properties;
00255 }
00256 
00257 
00258 void ModelEvaluator::OutArgs::_set_DgDx_dot_properties( int j, const DerivativeProperties &properties )
00259 {
00260   assert_supports(OUT_ARG_DgDx_dot,j);
00261   DgDx_dot_properties_[j] = properties;
00262 }
00263 
00264 
00265 void ModelEvaluator::OutArgs::_set_DgDx_properties( int j, const DerivativeProperties &properties )
00266 {
00267   assert_supports(OUT_ARG_DgDx,j);
00268   DgDx_properties_[j] = properties;
00269 }
00270 
00271 
00272 void ModelEvaluator::OutArgs::_set_DgDp_properties( int j, int l, const DerivativeProperties &properties )
00273 {
00274   assert_supports(OUT_ARG_DgDp,j,l);
00275   DgDp_properties_[ j*Np() + l ] = properties;
00276 }
00277 
00278 
00279 void ModelEvaluator::OutArgs::assert_supports(EOutArgsMembers arg) const
00280 {
00281   TEST_FOR_EXCEPTION(
00282     !supports_[arg], std::logic_error
00283     ,"EpetraExt::ModelEvaluator::OutArgs::assert_supports(arg): "
00284     "model = \'"<<modelEvalDescription_<<"\': Error, "
00285     "The argument arg = " << toString(arg) << " is not supported!"
00286     );
00287 }
00288 
00289 
00290 void ModelEvaluator::OutArgs::assert_supports(EOutArgsDfDp arg, int l) const
00291 {
00292   assert_l(l);
00293   TEST_FOR_EXCEPTION(
00294     supports_DfDp_[l].none(), std::logic_error
00295     ,"Thyra::ModelEvaluator::OutArgs::assert_supports(OUT_ARG_DfDp,l): "
00296     "model = \'"<<modelEvalDescription_<<"\': Error,"
00297     "The argument DfDp(l) with index l = " << l << " is not supported!"
00298     );
00299 }
00300 
00301 
00302 void ModelEvaluator::OutArgs::assert_supports(EOutArgsDgDx_dot arg, int j) const
00303 {
00304   assert_j(j);
00305   TEST_FOR_EXCEPTION(
00306     supports_DgDx_dot_[j].none(), std::logic_error
00307     ,"Thyra::ModelEvaluator::OutArgs::assert_supports(OUT_ARG_DgDx_dot,j): "
00308     "model = \'"<<modelEvalDescription_<<"\': Error,"
00309     "The argument DgDx_dot(j) with index j = " << j << " is not supported!"
00310     );
00311 }
00312 
00313 
00314 void ModelEvaluator::OutArgs::assert_supports(EOutArgsDgDx arg, int j) const
00315 {
00316   assert_j(j);
00317   TEST_FOR_EXCEPTION(
00318     supports_DgDx_[j].none(), std::logic_error
00319     ,"Thyra::ModelEvaluator::OutArgs::assert_supports(OUT_ARG_DgDx,j): "
00320     "model = \'"<<modelEvalDescription_<<"\': Error,"
00321     "The argument DgDx(j) with index j = " << j << " is not supported!"
00322     );
00323 }
00324 
00325 
00326 void ModelEvaluator::OutArgs::assert_supports(EOutArgsDgDp arg, int j, int l) const
00327 {
00328   assert_j(j);
00329   TEST_FOR_EXCEPTION(
00330     supports_DgDp_[ j*Np() + l ].none(), std::logic_error
00331     ,"Thyra::ModelEvaluator::OutArgs::assert_supports(OUT_ARG_DgDp,j,l): "
00332     "model = \'"<<modelEvalDescription_<<"\': Error,"
00333     "The argument DgDp(j,l) with indexes j = " << j << " and l = " << l << " is not supported!"
00334     );
00335 }
00336 
00337 
00338 void ModelEvaluator::OutArgs::assert_l(int l) const
00339 {
00340   TEST_FOR_EXCEPTION(
00341     Np()==0, std::logic_error
00342     ,"EpetraExt::ModelEvaluator::OutArgs::assert_l(l): model = \'"<<modelEvalDescription_<<"\':  Error, "
00343     "no auxiliary parameters subvectors p(l) are supported!!"
00344     );
00345   TEST_FOR_EXCEPTION(
00346     !( 0 <= l && l < Np() ), std::logic_error
00347     ,"Thyra::ModelEvaluator::OutArgs::assert_l(l): "
00348     "model = \'"<<modelEvalDescription_<<"\': Error, "
00349     "The parameter subvector p(l) index l = " << l << " is not in the range [0,"<<Np()-1<<"]!"
00350     );
00351 }
00352 
00353 
00354 void ModelEvaluator::OutArgs::assert_j(int j) const
00355 {
00356   TEST_FOR_EXCEPTION(
00357     Ng()==0, std::logic_error
00358     ,"EpetraExt::ModelEvaluator::OutArgs::assert_j(j): model = \'"<<modelEvalDescription_<<"\':  Error, "
00359     "no auxiliary functions g(j) are supported!!"
00360     );
00361   TEST_FOR_EXCEPTION(
00362     !( 0 <= j && j < Ng() ), std::logic_error
00363     ,"EpetraExt::ModelEvaluator::OutArgs::assert_j(j): model = \'"<<modelEvalDescription_<<"\':  Error, "
00364     "The auxiliary function g(j) index j = " << j << " is not in the range [0,"<<Ng()-1<<"]!"
00365     );
00366 }
00367 
00368 
00369 //
00370 // ModelEvaluator
00371 //
00372 
00373 
00374 // Destructor
00375 
00376 
00377 ModelEvaluator::~ModelEvaluator()
00378 {}
00379 
00380 
00381 // Vector maps
00382  
00383  
00384 Teuchos::RefCountPtr<const Epetra_Map>
00385 ModelEvaluator::get_p_map(int l) const
00386 { return Teuchos::null; }
00387  
00388 
00389 Teuchos::RefCountPtr<const Teuchos::Array<std::string> >
00390 ModelEvaluator::get_p_names(int l) const
00391 { return Teuchos::null; }
00392 
00393 
00394 Teuchos::RefCountPtr<const Epetra_Map>
00395 ModelEvaluator::get_g_map(int j) const
00396 { return Teuchos::null; }
00397 
00398 
00399 // Initial guesses for variables/parameters
00400 
00401 
00402 Teuchos::RefCountPtr<const Epetra_Vector>
00403 ModelEvaluator::get_x_init() const
00404 { return Teuchos::null; }
00405 
00406 
00407 Teuchos::RefCountPtr<const Epetra_Vector>
00408 ModelEvaluator::get_x_dot_init() const
00409 { return Teuchos::null; }
00410 
00411 
00412 Teuchos::RefCountPtr<const Epetra_Vector>
00413 ModelEvaluator::get_p_init(int l) const
00414 { return Teuchos::null; }
00415 
00416 
00417 double ModelEvaluator::get_t_init() const
00418 { return 0.0; }
00419 
00420 
00421 // Bounds for variables/parameters
00422 
00423 
00424 double ModelEvaluator::getInfBound() const
00425 {
00426   return 1e+50;
00427 }
00428 
00429 
00430 Teuchos::RefCountPtr<const Epetra_Vector>
00431 ModelEvaluator::get_x_lower_bounds() const
00432 { return Teuchos::null; }
00433 
00434 
00435 Teuchos::RefCountPtr<const Epetra_Vector>
00436 ModelEvaluator::get_x_upper_bounds() const
00437 { return Teuchos::null; }
00438 
00439 
00440 Teuchos::RefCountPtr<const Epetra_Vector>
00441 ModelEvaluator::get_p_lower_bounds(int l) const
00442 { return Teuchos::null; }
00443 
00444 
00445 Teuchos::RefCountPtr<const Epetra_Vector>
00446 ModelEvaluator::get_p_upper_bounds(int l) const
00447 { return Teuchos::null; }
00448 
00449 
00450 double ModelEvaluator::get_t_lower_bound() const
00451 { return 0.0; }
00452 
00453 
00454 double ModelEvaluator::get_t_upper_bound() const
00455 { return 0.0; }
00456 
00457 
00458 // Factory functions for creating derivative objects
00459 
00460 
00461 Teuchos::RefCountPtr<Epetra_Operator>
00462 ModelEvaluator::create_W() const
00463 { return Teuchos::null; }
00464 
00465 
00466 Teuchos::RefCountPtr<Epetra_Operator>
00467 ModelEvaluator::create_DfDp_op(int l) const
00468 { return Teuchos::null; }
00469 
00470 
00471 Teuchos::RefCountPtr<Epetra_Operator>
00472 ModelEvaluator::create_DgDx_dot_op(int j) const
00473 { return Teuchos::null; }
00474 
00475 
00476 Teuchos::RefCountPtr<Epetra_Operator>
00477 ModelEvaluator::create_DgDx_op(int j) const
00478 { return Teuchos::null; }
00479 
00480 
00481 Teuchos::RefCountPtr<Epetra_Operator>
00482 ModelEvaluator::create_DgDp_op( int j, int l ) const
00483 { return Teuchos::null; }
00484 
00485 
00486 } // namespace EpetraExt
00487 
00488 
00489 //
00490 // Helper functions
00491 //
00492 
00493 
00494 std::string EpetraExt::toString(
00495    ModelEvaluator::EDerivativeMultiVectorOrientation orientation
00496    )
00497 {
00498   switch(orientation) {
00499     case ModelEvaluator::DERIV_MV_BY_COL:
00500       return "DERIV_MV_BY_COL";
00501     case ModelEvaluator::DERIV_TRANS_MV_BY_ROW:
00502       return "DERIV_TRANS_MV_BY_ROW";
00503     default:
00504       TEST_FOR_EXCEPT(true);
00505   }
00506   return ""; // Should never be called
00507 }
00508 
00509 
00510 std::string EpetraExt::toString( ModelEvaluator::EInArgsMembers inArg )
00511 {
00512   switch(inArg) {
00513     case ModelEvaluator::IN_ARG_x_dot:
00514       return "IN_ARG_x_dot";
00515     case ModelEvaluator::IN_ARG_x:
00516       return "IN_ARG_x";
00517     case ModelEvaluator::IN_ARG_x_dot_poly:
00518       return "IN_ARG_x_dot_poly";
00519     case ModelEvaluator::IN_ARG_x_poly:
00520       return "IN_ARG_x_poly";
00521     case ModelEvaluator::IN_ARG_t:
00522       return "IN_ARG_t";
00523     case ModelEvaluator::IN_ARG_alpha:
00524       return "IN_ARG_alpha";
00525     case ModelEvaluator::IN_ARG_beta:
00526       return "IN_ARG_beta";
00527     default:
00528       TEST_FOR_EXCEPT("Invalid outArg!");
00529   }
00530   return ""; // Will never be executed!
00531 }
00532 
00533 
00534 std::string EpetraExt::toString( ModelEvaluator::EOutArgsMembers outArg )
00535 {
00536   switch(outArg) {
00537     case  ModelEvaluator::OUT_ARG_f:
00538       return "OUT_ARG_f";
00539     case ModelEvaluator::OUT_ARG_W:
00540       return "OUT_ARG_W";
00541     case ModelEvaluator::OUT_ARG_f_poly:
00542       return "OUT_ARG_f_poly";
00543     default:
00544       TEST_FOR_EXCEPT("Invalid outArg!");
00545   }
00546   return ""; // Will never be executed!
00547 }
00548 
00549 
00550 Teuchos::RefCountPtr<Epetra_Operator>
00551 EpetraExt::getLinearOp(
00552   const std::string &modelEvalDescription,
00553   const ModelEvaluator::Derivative &deriv,
00554   const std::string &derivName
00555   )
00556 {
00557   TEST_FOR_EXCEPTION(
00558     deriv.getMultiVector().get() != NULL, std::logic_error
00559     ,"For model \'" << modelEvalDescription << "\' the derivative \'"
00560     << derivName << "\' is of type Epetra_MultiVector and not of type Epetra_Operator!"
00561     );
00562   return deriv.getLinearOp();
00563 }
00564 
00565 
00566 Teuchos::RefCountPtr<Epetra_MultiVector>
00567 EpetraExt::getMultiVector(
00568   const std::string &modelEvalDescription,
00569   const ModelEvaluator::Derivative &deriv,
00570   const std::string &derivName,
00571   const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation
00572   )
00573 {
00574   TEST_FOR_EXCEPTION(
00575     deriv.getLinearOp().get() != NULL, std::logic_error
00576     ,"For model \'" << modelEvalDescription << "\' the derivative \'"
00577     << derivName << "\' is of type Epetra_Operator and not of type Epetra_MultiVector!"
00578     );
00579   Teuchos::RefCountPtr<Epetra_MultiVector>
00580     mv = deriv.getMultiVector();
00581   if(mv.get()) {
00582     TEST_FOR_EXCEPTION(
00583       deriv.getMultiVectorOrientation()!=mvOrientation, std::logic_error
00584       ,"For model \'" << modelEvalDescription << "\' the derivative \'"
00585       << derivName << "\' if not the orientation \'" << toString(mvOrientation)
00586       << "\'"
00587       );
00588   }
00589   return mv;
00590 }
00591 
00592 
00593 Teuchos::RefCountPtr<Epetra_Operator>
00594 EpetraExt::get_DfDp_op(
00595   const int l,
00596   const ModelEvaluator::OutArgs &outArgs
00597   )
00598 {
00599   std::ostringstream derivName; derivName << "DfDp("<<l<<")";
00600   return getLinearOp(
00601     outArgs.modelEvalDescription()
00602     ,outArgs.get_DfDp(l)
00603     ,derivName.str()
00604     );
00605 }
00606 
00607 
00608 Teuchos::RefCountPtr<Epetra_MultiVector>
00609 EpetraExt::get_DfDp_mv(
00610   const int l,
00611   const ModelEvaluator::OutArgs &outArgs
00612   )
00613 {
00614   std::ostringstream derivName; derivName << "DfDp("<<l<<")";
00615   return getMultiVector(
00616     outArgs.modelEvalDescription()
00617     ,outArgs.get_DfDp(l)
00618     ,derivName.str()
00619     ,ModelEvaluator::DERIV_MV_BY_COL
00620     );
00621 }
00622 
00623 
00624 Teuchos::RefCountPtr<Epetra_MultiVector>
00625 EpetraExt::get_DgDx_dot_mv(
00626   const int j,
00627   const ModelEvaluator::OutArgs &outArgs,
00628   const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation
00629   )
00630 {
00631   std::ostringstream derivName; derivName << "DgDx_dot("<<j<<")";
00632   return getMultiVector(
00633     outArgs.modelEvalDescription(),
00634     outArgs.get_DgDx_dot(j),
00635     derivName.str(),
00636     mvOrientation
00637     );
00638 }
00639 
00640 
00641 Teuchos::RefCountPtr<Epetra_MultiVector>
00642 EpetraExt::get_DgDx_mv(
00643   const int j,
00644   const ModelEvaluator::OutArgs &outArgs,
00645   const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation
00646   )
00647 {
00648   std::ostringstream derivName; derivName << "DgDx("<<j<<")";
00649   return getMultiVector(
00650     outArgs.modelEvalDescription(),
00651     outArgs.get_DgDx(j),
00652     derivName.str(),
00653     mvOrientation
00654     );
00655 }
00656 
00657 
00658 Teuchos::RefCountPtr<Epetra_MultiVector>
00659 EpetraExt::get_DgDp_mv(
00660   const int j,
00661   const int l,
00662   const ModelEvaluator::OutArgs &outArgs,
00663   const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation
00664   )
00665 {
00666   std::ostringstream derivName; derivName << "DgDp("<<j<<","<<l<<")";
00667   return getMultiVector(
00668     outArgs.modelEvalDescription(),
00669     outArgs.get_DgDp(j,l),
00670     derivName.str(),
00671     mvOrientation
00672     );
00673 }

Generated on Wed May 12 21:40:37 2010 for EpetraExt by  doxygen 1.4.7