Thyra_ModelEvaluator.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //    Thyra: Interfaces and Support for Abstract Numerical Algorithms
00005 //                 Copyright (2004) 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 
00030 #ifndef THYRA_MODEL_EVALUATOR_HPP
00031 #define THYRA_MODEL_EVALUATOR_HPP
00032 
00033 
00034 #include "Thyra_ModelEvaluatorBase.hpp"
00035 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
00036 
00037 
00038 namespace Thyra {
00039 
00040 
00619 template<class Scalar>
00620 class ModelEvaluator : public ModelEvaluatorBase {
00621 public:
00622 
00624   typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType ScalarMag;
00625 
00628 
00633   virtual int Np() const = 0;
00634 
00640   virtual int Ng() const = 0;
00641 
00643 
00646 
00648   virtual RCP<const VectorSpaceBase<Scalar> > get_x_space() const = 0;
00649 
00651   virtual RCP<const VectorSpaceBase<Scalar> > get_f_space() const = 0;
00652 
00665   virtual RCP<const VectorSpaceBase<Scalar> > get_p_space(int l) const = 0;
00666 
00680   virtual RCP<const Teuchos::Array<std::string> > get_p_names(int l) const = 0;
00681 
00694   virtual RCP<const VectorSpaceBase<Scalar> > get_g_space(int j) const = 0;
00695 
00697 
00700   
00720   virtual ModelEvaluatorBase::InArgs<Scalar> getNominalValues() const = 0;
00721   
00735   virtual ModelEvaluatorBase::InArgs<Scalar> getLowerBounds() const = 0;
00736   
00750   virtual ModelEvaluatorBase::InArgs<Scalar> getUpperBounds() const = 0;
00751 
00753 
00756 
00773   virtual RCP<LinearOpWithSolveBase<Scalar> > create_W() const = 0;
00774 
00799   virtual RCP<LinearOpBase<Scalar> > create_W_op() const = 0;
00800 
00811   virtual RCP<LinearOpBase<Scalar> > create_DfDp_op(int l) const = 0;
00812 
00823   virtual RCP<LinearOpBase<Scalar> > create_DgDx_dot_op(int j) const = 0;
00824 
00835   virtual RCP<LinearOpBase<Scalar> > create_DgDx_op(int j) const = 0;
00836 
00849   virtual RCP<LinearOpBase<Scalar> > create_DgDp_op( int j, int l ) const = 0;
00850   
00852 
00855 
00876   virtual RCP<const LinearOpWithSolveFactoryBase<Scalar> > get_W_factory() const = 0;
00877 
00879 
00882 
00894   virtual ModelEvaluatorBase::InArgs<Scalar> createInArgs() const = 0;
00895 
00907   virtual ModelEvaluatorBase::OutArgs<Scalar> createOutArgs() const = 0;
00908 
00966   virtual void evalModel(
00967     const ModelEvaluatorBase::InArgs<Scalar> &inArgs,
00968     const ModelEvaluatorBase::OutArgs<Scalar> &outArgs
00969     ) const = 0;
00970 
00972 
00975 
00982   virtual void reportFinalPoint(
00983     const ModelEvaluatorBase::InArgs<Scalar> &finalPoint,
00984     const bool wasSolved
00985     ) = 0;
00986 
00988 
00989 private:
00990   
00991   // Not defined and not to be called
00992   ModelEvaluator<Scalar>&
00993   operator=(const ModelEvaluator<Scalar>&);
00994 
00995 };
00996 
00997 } // namespace Thyra
00998 
00999 
01000 #endif // THYRA_MODEL_EVALUATOR_HPP

Generated on Tue Jul 13 09:26:22 2010 for Thyra by  doxygen 1.4.7