Playa::NonlinearOperatorBase< Scalar > Class Template Reference

Base class for nonlinear operators. More...

Inheritance diagram for Playa::NonlinearOperatorBase< Scalar >:

Playa::Handleable< NonlinearOperatorBase< Scalar > > Playa::ObjectWithVerbosity

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
VectorSpaceBase< Scalar > > & 
domain () const
 Return the domain space.
const RCP< const
VectorSpaceBase< Scalar > > & 
range () const
 Return the range space.
void setEvalPt (const Vector< Scalar > &x) const
 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 VectorSpaceBase
< Scalar > > 
domain_
RCP< const VectorSpaceBase
< Scalar > > 
range_
bool jacobianIsValid_
bool residualIsValid_
Vector< double > currentEvalPt_
Vector< double > currentFunctionValue_
LinearOperator< double > currentJ_


Detailed Description

template<class Scalar>
class Playa::NonlinearOperatorBase< Scalar >

Base class for nonlinear operators.

Definition at line 24 of file PlayaNonlinearOperatorBase.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Playa::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 31 of file PlayaNonlinearOperatorBase.hpp.

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

Construct a nonlinear operator with a domain and range.

Definition at line 41 of file PlayaNonlinearOperatorBase.hpp.


Member Function Documentation

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

Compute the function value at the current eval point.

Reimplemented in Sundance::NLOp.

Definition at line 162 of file PlayaNonlinearOperatorBase.hpp.

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

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

template<class Scalar>
const Vector<double>& Playa::NonlinearOperatorBase< Scalar >::currentEvalPt (  )  const [inline]

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

Definition at line 80 of file PlayaNonlinearOperatorBase.hpp.

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

Return the domain space.

Definition at line 52 of file PlayaNonlinearOperatorBase.hpp.

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

Return the function value at the current evaluation point.

Definition at line 119 of file PlayaNonlinearOperatorBase.hpp.

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

Return an initial guess appropriate to this problem.

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

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

Return the Jacobian at the current evaluation point.

Definition at line 83 of file PlayaNonlinearOperatorBase.hpp.

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

Return the range space.

Definition at line 56 of file PlayaNonlinearOperatorBase.hpp.

template<class Scalar>
void Playa::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 171 of file PlayaNonlinearOperatorBase.hpp.

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

Set the evaluation point.

Definition at line 60 of file PlayaNonlinearOperatorBase.hpp.


Member Data Documentation

template<class Scalar>
Vector<double> Playa::NonlinearOperatorBase< Scalar >::currentEvalPt_ [mutable, private]

template<class Scalar>
Vector<double> Playa::NonlinearOperatorBase< Scalar >::currentFunctionValue_ [mutable, private]

template<class Scalar>
LinearOperator<double> Playa::NonlinearOperatorBase< Scalar >::currentJ_ [mutable, private]

template<class Scalar>
RCP<const VectorSpaceBase<Scalar> > Playa::NonlinearOperatorBase< Scalar >::domain_ [private]

template<class Scalar>
bool Playa::NonlinearOperatorBase< Scalar >::jacobianIsValid_ [mutable, private]

template<class Scalar>
RCP<const VectorSpaceBase<Scalar> > Playa::NonlinearOperatorBase< Scalar >::range_ [private]

template<class Scalar>
bool Playa::NonlinearOperatorBase< Scalar >::residualIsValid_ [mutable, private]

Site Contact