2
// ***********************************************************************
5
// Copyright (2006) Sandia Corporation
7
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8
// license for use of this work by or on behalf of the U.S. Government.
10
// This library is free software; you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as
12
// published by the Free Software Foundation; either version 2.1 of the
13
// License, or (at your option) any later version.
15
// This library is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
// Lesser General Public License for more details.
20
// You should have received a copy of the GNU Lesser General Public
21
// License along with this library; if not, write to the Free Software
22
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24
// Questions? Contact Todd S. Coffey (tscoffe@sandia.gov)
26
// ***********************************************************************
29
#ifndef Rythmos_FORWARD_SENSITIVITY_STEPPER_TESTER_DECL_H
30
#define Rythmos_FORWARD_SENSITIVITY_STEPPER_TESTER_DECL_H
33
#include "Rythmos_StepperSupportTypes.hpp"
34
#include "Rythmos_IntegratorBase.hpp"
35
#include "Thyra_ModelEvaluator.hpp"
36
#include "Teuchos_VerboseObject.hpp"
37
#include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
43
template<class Scalar> class ForwardSensitivityStepperTester;
46
namespace ForwardSensitivityStepperTesterUtils {
48
const std::string FdCalc_name = "FD Calc";
50
const std::string ErrorTol_name = "Error Tol";
51
const double ErrorTol_default = 1e-6;
53
} // namespace ForwardSensitivityStepperTesterUtils
56
/** \brief Nonmember constructor.
58
* \relates ForwardSensitivityStepperTester
60
template<class Scalar>
61
RCP<ForwardSensitivityStepperTester<Scalar> >
62
forwardSensitivityStepperTester();
65
/** \brief Nonmember constructor.
67
* \relates ForwardSensitivityStepperTester
69
template<class Scalar>
70
RCP<ForwardSensitivityStepperTester<Scalar> >
71
forwardSensitivityStepperTester(const RCP<ParameterList> ¶mList);
74
/** \brief Concrete testing class for forward sensitivities.
76
* ToDo: Finish documentation!
78
template<class Scalar>
79
class ForwardSensitivityStepperTester
80
: virtual public Teuchos::VerboseObject<ForwardSensitivityStepperTester<Scalar> >,
81
virtual public Teuchos::ParameterListAcceptorDefaultBase
85
typedef typename ScalarTraits<Scalar>::magnitudeType ScalarMag;
87
/** @name Overridden from ParameterListAcceptor (simple forwarding functions) */
91
void setParameterList(RCP<ParameterList> const& paramList);
93
RCP<const ParameterList> getValidParameters() const;
97
/** \name Testing functions */
100
/** \brief Test a forward sensitivity stepper.
102
bool testForwardSens(
103
const Ptr<IntegratorBase<Scalar> > &fwdSensIntegrator
108
#ifndef TEMPLATE_FRIENDS_NOT_SUPPORTED
110
/** \name Public friend functions */
114
friend RCP< ForwardSensitivityStepperTester<Scalar> >
115
forwardSensitivityStepperTester<>();
119
#endif // TEMPLATE_FRIENDS_NOT_SUPPORTED
122
#ifndef TEMPLATE_FRIENDS_NOT_SUPPORTED
124
#endif // TEMPLATE_FRIENDS_NOT_SUPPORTED
126
ForwardSensitivityStepperTester(); // Note defined and not to be called
135
} // namespace Rythmos
138
#endif //Rythmos_FORWARD_SENSITIVITY_STEPPER_TESTER_DECL_H