42 #ifndef THYRA_DIRECTIONAL_FINITE_DIFF_CALCULATOR_DECL_HPP 43 #define THYRA_DIRECTIONAL_FINITE_DIFF_CALCULATOR_DECL_HPP 45 #include "Thyra_ModelEvaluator.hpp" 46 #include "Teuchos_VerboseObject.hpp" 47 #include "Teuchos_ParameterListAcceptor.hpp" 48 #include "Teuchos_StandardMemberCompositionMacros.hpp" 49 #include "Teuchos_StandardParameterEntryValidators.hpp" 55 namespace DirectionalFiniteDiffCalculatorTypes {
67 ,FD_ORDER_FOUR_CENTRAL
92 { supports_DfDp_.push_back(l);
return *
this; }
95 { supports_DgDp_.push_back(std::pair<int,int>(j,l));
return *
this; }
98 typedef std::list<int> supports_DfDp_t;
99 typedef std::list<std::pair<int,int> > supports_DgDp_t;
100 supports_DfDp_t supports_DfDp_;
101 supports_DgDp_t supports_DgDp_;
129 template<
class Scalar>
182 EFDMethodType fd_method_type = DirectionalFiniteDiffCalculatorTypes::FD_ORDER_FOUR_AUTO,
183 EFDStepSelectType fd_step_select_type = DirectionalFiniteDiffCalculatorTypes::FD_STEP_ABSOLUTE,
184 ScalarMag fd_step_size = -1.0,
185 ScalarMag fd_step_size_min = -1.0
218 const SelectedDerivatives &fdDerivatives
243 void calcDerivatives(
259 static const std::string& FDMethod_name();
264 static const std::string& FDMethod_default();
266 static const std::string& FDStepSelectType_name();
269 fdStepSelectTypeValidator();
271 static const std::string& FDStepSelectType_default();
273 static const std::string& FDStepLength_name();
275 static const double& FDStepLength_default();
284 template<
class Scalar>
298 template<
class Scalar>
306 fdCalc->setParameterList(paramList);
314 #endif // THYRA_DIRECTIONAL_FINITE_DIFF_CALCULATOR_DECL_HPP Pure abstract base interface for evaluating a stateless "model" that can be mapped into a number of d...
Simple utility class used to select finite difference derivatives for OutArgs object.
DirectionalFiniteDiffCalculatorTypes::EFDStepSelectType EFDStepSelectType
ScalarTraits< Scalar > ST
Concrete aggregate class for all output arguments computable by a ModelEvaluator subclass object...
DirectionalFiniteDiffCalculatorTypes::EFDMethodType EFDMethodType
RCP< DirectionalFiniteDiffCalculator< Scalar > > directionalFiniteDiffCalculator()
Nonmember constructor.
DirectionalFiniteDiffCalculatorTypes::SelectedDerivatives SelectedDerivatives
#define STANDARD_MEMBER_COMPOSITION_MEMBERS(TYPE, NAME)
ScalarTraits< ScalarMag > SMT
SelectedDerivatives & supports(ModelEvaluatorBase::EOutArgsDgDp arg, int j, int l)
ST::magnitudeType ScalarMag
RCP< DirectionalFiniteDiffCalculator< Scalar > > directionalFiniteDiffCalculator(const RCP< ParameterList > ¶mList)
Nonmember constructor.
SelectedDerivatives & supports(ModelEvaluatorBase::EOutArgsDfDp arg, int l)
Utility class for computing directional finite differences of a model.
Concrete aggregate class for all input arguments computable by a ModelEvaluator subclass object...