Thyra::DirectionalFiniteDiffCalculator< Scalar > Class Template Reference

Utility calss for computing directional finite differences of a model. More...

#include <Thyra_DirectionalFiniteDiffCalculator.hpp>

List of all members.

Public Types

typedef Teuchos::ScalarTraits<
Scalar >::magnitudeType 
ScalarMag
 
typedef DirectionalFiniteDiffCalculatorTypes::EFDMethodType EFDMethodType
 
typedef DirectionalFiniteDiffCalculatorTypes::EFDStepSelectType EFDStepSelectType
 

Public Member Functions

void fd_method_type (const EFDMethodType &fd_method_type)
 
const EFDMethodTypefd_method_type () const
void fd_step_select_type (const EFDStepSelectType &fd_step_select_type)
 
const EFDStepSelectTypefd_step_select_type () const
void fd_step_size (const ScalarMag &fd_step_size)
 Pick the size of the finite difference step.
const ScalarMagfd_step_size () const
void fd_step_size_min (const ScalarMag &fd_step_size_min)
 Pick the minimum step size under which the finite difference product.
const ScalarMagfd_step_size_min () const
 DirectionalFiniteDiffCalculator (EFDMethodType fd_method_type=DirectionalFiniteDiffCalculatorTypes::FD_ORDER_FOUR_AUTO, EFDStepSelectType fd_step_select_type=DirectionalFiniteDiffCalculatorTypes::FD_STEP_ABSOLUTE, ScalarMag fd_step_size=-1.0, ScalarMag fd_step_size_min=-1.0)
 
void calcVariations (const ModelEvaluator< Scalar > &model, const ModelEvaluatorBase::InArgs< Scalar > &basePoint, const ModelEvaluatorBase::InArgs< Scalar > &directions, const ModelEvaluatorBase::OutArgs< Scalar > &baseFunctionValues, const ModelEvaluatorBase::OutArgs< Scalar > &variations) const
 Compute variations using directional finite differences..
void calcDerivatives (const ModelEvaluator< Scalar > &model, const ModelEvaluatorBase::InArgs< Scalar > &basePoint, const ModelEvaluatorBase::OutArgs< Scalar > &baseFunctionValues, const ModelEvaluatorBase::OutArgs< Scalar > &derivatives) const
 Compute entire derivative objects using finite differences.

Private Attributes

EFDMethodType fd_method_type_
EFDStepSelectType fd_step_select_type_
ScalarMag fd_step_size_
ScalarMag fd_step_size_min_


Detailed Description

template<class Scalar>
class Thyra::DirectionalFiniteDiffCalculator< Scalar >

Utility calss for computing directional finite differences of a model.

This class compute finite difference approximations to the variations:

The client can leave any of the delta_x or delta_p(l) directions as NULL and they will be assumed to be zero.

ToDo: Finish documentaton!

Definition at line 51 of file Thyra_DirectionalFiniteDiffCalculator.hpp.


Member Typedef Documentation

template<class Scalar>
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Thyra::DirectionalFiniteDiffCalculator< Scalar >::ScalarMag
 

Definition at line 58 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
typedef DirectionalFiniteDiffCalculatorTypes::EFDMethodType Thyra::DirectionalFiniteDiffCalculator< Scalar >::EFDMethodType
 

Definition at line 61 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
typedef DirectionalFiniteDiffCalculatorTypes::EFDStepSelectType Thyra::DirectionalFiniteDiffCalculator< Scalar >::EFDStepSelectType
 

Definition at line 64 of file Thyra_DirectionalFiniteDiffCalculator.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::DirectionalFiniteDiffCalculator< Scalar >::DirectionalFiniteDiffCalculator EFDMethodType  fd_method_type = DirectionalFiniteDiffCalculatorTypes::FD_ORDER_FOUR_AUTO,
EFDStepSelectType  fd_step_select_type = DirectionalFiniteDiffCalculatorTypes::FD_STEP_ABSOLUTE,
ScalarMag  fd_step_size = -1.0,
ScalarMag  fd_step_size_min = -1.0
 

Definition at line 133 of file Thyra_DirectionalFiniteDiffCalculator.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_method_type const EFDMethodType fd_method_type  )  [inline]
 

Definition at line 67 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
const EFDMethodType& Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_method_type  )  const [inline]
 

Definition at line 67 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
void Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_select_type const EFDStepSelectType fd_step_select_type  )  [inline]
 

Definition at line 70 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
const EFDStepSelectType& Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_select_type  )  const [inline]
 

Definition at line 70 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
void Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_size const ScalarMag fd_step_size  )  [inline]
 

Pick the size of the finite difference step.

If fd_step_size < 0 then the implementation will try to select it based on the order of method fd_method_type() that is selected.

Definition at line 78 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
const ScalarMag& Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_size  )  const [inline]
 

Definition at line 78 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
void Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_size_min const ScalarMag fd_step_size_min  )  [inline]
 

Pick the minimum step size under which the finite difference product.

will not be computed.

If fd_step_size_min == 0 then the finite difference computation will always be performed. If fd_step_size_min < 0 then the minimum step size will be determined internally.

Definition at line 88 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
const ScalarMag& Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_size_min  )  const [inline]
 

Definition at line 88 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
void Thyra::DirectionalFiniteDiffCalculator< Scalar >::calcVariations const ModelEvaluator< Scalar > &  model,
const ModelEvaluatorBase::InArgs< Scalar > &  basePoint,
const ModelEvaluatorBase::InArgs< Scalar > &  directions,
const ModelEvaluatorBase::OutArgs< Scalar > &  baseFunctionValues,
const ModelEvaluatorBase::OutArgs< Scalar > &  variations
const
 

Compute variations using directional finite differences..

The computation may fail if a NaN or Inf is encountered during any of the computations in which case a NaNInfException exception will be thrown. Otherwise the computation should be completed successfully.

If the finite difference could not be computed because of cramped bounds then a CrampedBoundsException object will be thrown.

ToDo: Discuss options!

Definition at line 146 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
void Thyra::DirectionalFiniteDiffCalculator< Scalar >::calcDerivatives const ModelEvaluator< Scalar > &  model,
const ModelEvaluatorBase::InArgs< Scalar > &  basePoint,
const ModelEvaluatorBase::OutArgs< Scalar > &  baseFunctionValues,
const ModelEvaluatorBase::OutArgs< Scalar > &  derivatives
const
 

Compute entire derivative objects using finite differences.

Definition at line 615 of file Thyra_DirectionalFiniteDiffCalculator.hpp.


Member Data Documentation

template<class Scalar>
EFDMethodType Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_method_type_ [private]
 

Definition at line 67 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
EFDStepSelectType Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_select_type_ [private]
 

Definition at line 70 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
ScalarMag Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_size_ [private]
 

Definition at line 78 of file Thyra_DirectionalFiniteDiffCalculator.hpp.

template<class Scalar>
ScalarMag Thyra::DirectionalFiniteDiffCalculator< Scalar >::fd_step_size_min_ [private]
 

Definition at line 88 of file Thyra_DirectionalFiniteDiffCalculator.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:33:12 2008 for Thyra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1