Public Member Functions | Protected Member Functions | Private Attributes
TSFExtended::NonlinearOperatorBase< Scalar > Class Template Reference

Base class for nonlinear operators. More...

Inheritance diagram for TSFExtended::NonlinearOperatorBase< Scalar >:
Sundance::Handleable< NonlinearOperatorBase< Scalar > > Sundance::ObjectWithClassVerbosity< NonlinearOperatorBase< Scalar > > Sundance::DefaultObjectWithVerbosity Sundance::ObjectWithVerbosityBase

List of all members.

Public Member Functions

 NonlinearOperatorBase ()
 Empty ctor, for contexts in which we don't know the domain and range spaces at the beginning of construction time.
 NonlinearOperatorBase (const VectorSpace< Scalar > &domain, const VectorSpace< Scalar > &range)
 Construct a nonlinear operator with a domain and range.
const RCP< const
Thyra::VectorSpaceBase< Scalar > > & 
domain () const
 Return the domain space.
const RCP< const
Thyra::VectorSpaceBase< Scalar > > & 
range () const
 Return the range space.
void setEvalPt (const Vector< Scalar > &x)
 Set the evaluation point.
const Vector< double > & currentEvalPt () const
 Get the current point at which the function is to be evaluated.
LinearOperator< double > getJacobian () const
 Return the Jacobian at the current evaluation point.
Vector< double > getFunctionValue () const
 Return the function value at the current evaluation point.
virtual Vector< double > getInitialGuess () const =0
 Return an initial guess appropriate to this problem.

Protected Member Functions

virtual LinearOperator< Scalar > computeJacobianAndFunction (Vector< double > &functionValue) const =0
 Compute the Jacobian at the current eval point.
virtual Vector< Scalar > computeFunctionValue () const
 Compute the function value at the current eval point.
void setDomainAndRange (const VectorSpace< Scalar > &domain, const VectorSpace< Scalar > &range)
 Set the domain and range.

Private Attributes

RCP< const
Thyra::VectorSpaceBase< Scalar > > 
domain_
RCP< const
Thyra::VectorSpaceBase< Scalar > > 
range_
bool jacobianIsValid_
bool residualIsValid_
Vector< double > currentEvalPt_
Vector< double > currentFunctionValue_
LinearOperator< double > currentJ_

Detailed Description

template<class Scalar>
class TSFExtended::NonlinearOperatorBase< Scalar >

Base class for nonlinear operators.

Definition at line 49 of file TSFNonlinearOperatorBase.hpp.


Constructor & Destructor Documentation

template<class Scalar>
TSFExtended::NonlinearOperatorBase< Scalar >::NonlinearOperatorBase ( ) [inline]

Empty ctor, for contexts in which we don't know the domain and range spaces at the beginning of construction time.

Definition at line 56 of file TSFNonlinearOperatorBase.hpp.

template<class Scalar>
TSFExtended::NonlinearOperatorBase< Scalar >::NonlinearOperatorBase ( const VectorSpace< Scalar > &  domain,
const VectorSpace< Scalar > &  range 
) [inline]

Construct a nonlinear operator with a domain and range.

Definition at line 66 of file TSFNonlinearOperatorBase.hpp.


Member Function Documentation

template<class Scalar>
virtual Vector<Scalar> TSFExtended::NonlinearOperatorBase< Scalar >::computeFunctionValue ( ) const [inline, protected, virtual]

Compute the function value at the current eval point.

Reimplemented in Sundance::NLOp.

Definition at line 193 of file TSFNonlinearOperatorBase.hpp.

Referenced by TSFExtended::NonlinearOperatorBase< double >::getFunctionValue().

template<class Scalar>
virtual LinearOperator<Scalar> TSFExtended::NonlinearOperatorBase< Scalar >::computeJacobianAndFunction ( Vector< double > &  functionValue) const [protected, pure virtual]
template<class Scalar>
const Vector<double>& TSFExtended::NonlinearOperatorBase< Scalar >::currentEvalPt ( ) const [inline]

Get the current point at which the function is to be evaluated.

Definition at line 111 of file TSFNonlinearOperatorBase.hpp.

template<class Scalar>
const RCP<const Thyra::VectorSpaceBase<Scalar> >& TSFExtended::NonlinearOperatorBase< Scalar >::domain ( ) const [inline]

Return the domain space.

Definition at line 77 of file TSFNonlinearOperatorBase.hpp.

template<class Scalar>
Vector<double> TSFExtended::NonlinearOperatorBase< Scalar >::getFunctionValue ( ) const [inline]

Return the function value at the current evaluation point.

Definition at line 150 of file TSFNonlinearOperatorBase.hpp.

template<class Scalar>
virtual Vector<double> TSFExtended::NonlinearOperatorBase< Scalar >::getInitialGuess ( ) const [pure virtual]

Return an initial guess appropriate to this problem.

Implemented in Sundance::NLOp, and TSFExtended::PoissonBoltzmannOp.

template<class Scalar>
LinearOperator<double> TSFExtended::NonlinearOperatorBase< Scalar >::getJacobian ( ) const [inline]

Return the Jacobian at the current evaluation point.

Definition at line 114 of file TSFNonlinearOperatorBase.hpp.

template<class Scalar>
const RCP<const Thyra::VectorSpaceBase<Scalar> >& TSFExtended::NonlinearOperatorBase< Scalar >::range ( ) const [inline]

Return the range space.

Definition at line 81 of file TSFNonlinearOperatorBase.hpp.

template<class Scalar>
void TSFExtended::NonlinearOperatorBase< Scalar >::setDomainAndRange ( const VectorSpace< Scalar > &  domain,
const VectorSpace< Scalar > &  range 
) [inline, protected]

Set the domain and range.

This is protected so that solver developers don't try to change the spaces on the fly

Definition at line 202 of file TSFNonlinearOperatorBase.hpp.

template<class Scalar>
void TSFExtended::NonlinearOperatorBase< Scalar >::setEvalPt ( const Vector< Scalar > &  x) [inline]

Set the evaluation point.

Definition at line 85 of file TSFNonlinearOperatorBase.hpp.


Member Data Documentation

template<class Scalar>
Vector<double> TSFExtended::NonlinearOperatorBase< Scalar >::currentEvalPt_ [private]
template<class Scalar>
Vector<double> TSFExtended::NonlinearOperatorBase< Scalar >::currentFunctionValue_ [mutable, private]
template<class Scalar>
LinearOperator<double> TSFExtended::NonlinearOperatorBase< Scalar >::currentJ_ [mutable, private]
template<class Scalar>
RCP<const Thyra::VectorSpaceBase<Scalar> > TSFExtended::NonlinearOperatorBase< Scalar >::domain_ [private]
template<class Scalar>
bool TSFExtended::NonlinearOperatorBase< Scalar >::jacobianIsValid_ [mutable, private]
template<class Scalar>
RCP<const Thyra::VectorSpaceBase<Scalar> > TSFExtended::NonlinearOperatorBase< Scalar >::range_ [private]
template<class Scalar>
bool TSFExtended::NonlinearOperatorBase< Scalar >::residualIsValid_ [mutable, private]

Site Contact