Rythmos_StepperHelpers_decl.hpp

00001 //@HEADER
00002 // ***********************************************************************
00003 //
00004 //                           Rythmos Package
00005 //                 Copyright (2006) 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 Todd S. Coffey (tscoffe@sandia.gov)
00025 //
00026 // ***********************************************************************
00027 //@HEADER
00028 
00029 #ifndef RYTHMOS_STEPPER_HELPERS_DECL_HPP
00030 #define RYTHMOS_STEPPER_HELPERS_DECL_HPP
00031 
00032 
00033 #include "Rythmos_Types.hpp"
00034 #include "Rythmos_StepperBase.hpp"
00035 #include "Thyra_ModelEvaluator.hpp"
00036 #include "Rythmos_InterpolatorBase.hpp"
00037 
00038 namespace Rythmos {
00039 
00040 
00044 template<class Scalar>
00045 void assertValidModel(
00046   const StepperBase<Scalar>& stepper,
00047   const Thyra::ModelEvaluator<Scalar>& model
00048   );
00049 
00050 
00057 template<class Scalar>
00058 bool setDefaultInitialConditionFromNominalValues(
00059   const Thyra::ModelEvaluator<Scalar>& model,
00060   const Ptr<StepperBase<Scalar> >& stepper
00061   );
00062 
00070 template<class Scalar>
00071 void restart( StepperBase<Scalar> *stepper );
00072 
00073 template<class Scalar>
00074 void eval_model_explicit(
00075     const Thyra::ModelEvaluator<Scalar> &model,
00076     Thyra::ModelEvaluatorBase::InArgs<Scalar> &basePoint,
00077     const VectorBase<Scalar>& x_in,
00078     const typename Thyra::ModelEvaluatorBase::InArgs<Scalar>::ScalarMag &t_in,
00079     const Ptr<VectorBase<Scalar> >& f_out
00080     );
00081 
00082 template<class Scalar>
00083 void eval_model_explicit_poly(
00084     const Thyra::ModelEvaluator<Scalar> &model,
00085     Thyra::ModelEvaluatorBase::InArgs<Scalar> &basePoint,
00086     const Teuchos::Polynomial< VectorBase<Scalar> > &x_poly,
00087     const typename Thyra::ModelEvaluatorBase::InArgs<Scalar>::ScalarMag &t,
00088     const Ptr<Teuchos::Polynomial<VectorBase<Scalar> > >& f_poly
00089     );
00090 
00091 
00092 // This function simply returns the boundary points if they're asked for.  Otherwise it throws.
00093 template<class Scalar>
00094 void defaultGetPoints(
00095     const Scalar& t_old, // required inArg
00096     const Ptr<const VectorBase<Scalar> >& x_old, // optional inArg
00097     const Ptr<const VectorBase<Scalar> >& xdot_old, // optional inArg
00098     const Scalar& t, // required inArg
00099     const Ptr<const VectorBase<Scalar> >& x, // optional inArg
00100     const Ptr<const VectorBase<Scalar> >& xdot, // optional inArg
00101     const Array<Scalar>& time_vec, // required inArg
00102     const Ptr<Array<Teuchos::RCP<const Thyra::VectorBase<Scalar> > > >& x_vec, // optional outArg
00103     const Ptr<Array<Teuchos::RCP<const Thyra::VectorBase<Scalar> > > >& xdot_vec, // optional outArg
00104     const Ptr<Array<typename Teuchos::ScalarTraits<Scalar>::magnitudeType> >& accuracy_vec, // optional outArg
00105     const Ptr<InterpolatorBase<Scalar> > interpolator // optional inArg (note:  not const)
00106     );
00107 
00108 } // namespace Rythmos
00109 
00110 
00111 #endif // RYTHMOS_STEPPER_HELPERS_DECL_HPP

Generated on Wed May 12 21:25:44 2010 for Rythmos - Transient Integration for Differential Equations by  doxygen 1.4.7