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 00617 template<class Scalar> 00618 class ModelEvaluator : public ModelEvaluatorBase { 00619 public: 00620 00622 typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType ScalarMag; 00623 00626 00631 virtual int Np() const = 0; 00632 00638 virtual int Ng() const = 0; 00639 00641 00644 00646 virtual RCP<const VectorSpaceBase<Scalar> > get_x_space() const = 0; 00647 00649 virtual RCP<const VectorSpaceBase<Scalar> > get_f_space() const = 0; 00650 00663 virtual RCP<const VectorSpaceBase<Scalar> > get_p_space(int l) const = 0; 00664 00678 virtual RCP<const Teuchos::Array<std::string> > get_p_names(int l) const = 0; 00679 00692 virtual RCP<const VectorSpaceBase<Scalar> > get_g_space(int j) const = 0; 00693 00695 00698 00718 virtual ModelEvaluatorBase::InArgs<Scalar> getNominalValues() const = 0; 00719 00733 virtual ModelEvaluatorBase::InArgs<Scalar> getLowerBounds() const = 0; 00734 00748 virtual ModelEvaluatorBase::InArgs<Scalar> getUpperBounds() const = 0; 00749 00751 00754 00771 virtual RCP<LinearOpWithSolveBase<Scalar> > create_W() const = 0; 00772 00797 virtual RCP<LinearOpBase<Scalar> > create_W_op() const = 0; 00798 00809 virtual RCP<LinearOpBase<Scalar> > create_DfDp_op(int l) const = 0; 00810 00821 virtual RCP<LinearOpBase<Scalar> > create_DgDx_dot_op(int j) const = 0; 00822 00833 virtual RCP<LinearOpBase<Scalar> > create_DgDx_op(int j) const = 0; 00834 00847 virtual RCP<LinearOpBase<Scalar> > create_DgDp_op( int j, int l ) const = 0; 00848 00850 00853 00874 virtual RCP<const LinearOpWithSolveFactoryBase<Scalar> > get_W_factory() const = 0; 00875 00877 00880 00892 virtual ModelEvaluatorBase::InArgs<Scalar> createInArgs() const = 0; 00893 00905 virtual ModelEvaluatorBase::OutArgs<Scalar> createOutArgs() const = 0; 00906 00949 virtual void evalModel( 00950 const ModelEvaluatorBase::InArgs<Scalar> &inArgs, 00951 const ModelEvaluatorBase::OutArgs<Scalar> &outArgs 00952 ) const = 0; 00953 00955 00958 00965 virtual void reportFinalPoint( 00966 const ModelEvaluatorBase::InArgs<Scalar> &finalPoint, 00967 const bool wasSolved 00968 ) = 0; 00969 00971 00972 }; 00973 00974 } // namespace Thyra 00975 00976 00977 #endif // THYRA_MODEL_EVALUATOR_HPP
1.4.7