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 #ifndef THYRA_MODEL_EVALUATOR_HPP 00030 #define THYRA_MODEL_EVALUATOR_HPP 00031 00032 #include "Thyra_ModelEvaluatorBase.hpp" 00033 00034 namespace Thyra { 00035 00612 template<class Scalar> 00613 class ModelEvaluator : public ModelEvaluatorBase { 00614 public: 00615 00617 typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType ScalarMag; 00618 00621 00626 virtual int Np() const = 0; 00627 00633 virtual int Ng() const = 0; 00634 00636 00639 00641 virtual RCP<const VectorSpaceBase<Scalar> > get_x_space() const = 0; 00642 00644 virtual RCP<const VectorSpaceBase<Scalar> > get_f_space() const = 0; 00645 00658 virtual RCP<const VectorSpaceBase<Scalar> > get_p_space(int l) const = 0; 00659 00673 virtual RCP<const Teuchos::Array<std::string> > get_p_names(int l) const = 0; 00674 00687 virtual RCP<const VectorSpaceBase<Scalar> > get_g_space(int j) const = 0; 00688 00690 00693 00713 virtual ModelEvaluatorBase::InArgs<Scalar> getNominalValues() const = 0; 00714 00728 virtual ModelEvaluatorBase::InArgs<Scalar> getLowerBounds() const = 0; 00729 00743 virtual ModelEvaluatorBase::InArgs<Scalar> getUpperBounds() const = 0; 00744 00746 00749 00762 virtual RCP<LinearOpWithSolveBase<Scalar> > create_W() const = 0; 00763 00776 virtual RCP<LinearOpBase<Scalar> > create_W_op() const = 0; 00777 00788 virtual RCP<LinearOpBase<Scalar> > create_DfDp_op(int l) const = 0; 00789 00800 virtual RCP<LinearOpBase<Scalar> > create_DgDx_dot_op(int j) const = 0; 00801 00812 virtual RCP<LinearOpBase<Scalar> > create_DgDx_op(int j) const = 0; 00813 00826 virtual RCP<LinearOpBase<Scalar> > create_DgDp_op( int j, int l ) const = 0; 00827 00829 00832 00844 virtual ModelEvaluatorBase::InArgs<Scalar> createInArgs() const = 0; 00845 00857 virtual ModelEvaluatorBase::OutArgs<Scalar> createOutArgs() const = 0; 00858 00901 virtual void evalModel( 00902 const ModelEvaluatorBase::InArgs<Scalar> &inArgs, 00903 const ModelEvaluatorBase::OutArgs<Scalar> &outArgs 00904 ) const = 0; 00905 00907 00910 00917 virtual void reportFinalPoint( 00918 const ModelEvaluatorBase::InArgs<Scalar> &finalPoint, 00919 const bool wasSolved 00920 ) = 0; 00921 00923 00924 }; 00925 00926 } // namespace Thyra 00927 00928 00929 #endif // THYRA_MODEL_EVALUATOR_HPP
1.4.7