Sundance::NLOp Class Reference

Inheritance diagram for Sundance::NLOp:

Sundance::ObjectWithClassVerbosity< NLOp > Playa::NonlinearOperatorBase< double > Playa::ObjectWithVerbosity Playa::Handleable< NonlinearOperatorBase< double > > Playa::ObjectWithVerbosity

List of all members.

Public Member Functions

 NLOp ()
 NLOp (const Mesh &mesh, const Expr &eqn, const Expr &bc, const Expr &test, const Expr &unk, const Expr &u0, const Playa::VectorType< double > &vecType, bool partitionBCs=false)
 NLOp (const Mesh &mesh, const Expr &eqn, const Expr &bc, const BlockArray &test, const BlockArray &unk, const Expr &u0)
 NLOp (const Mesh &mesh, const Expr &eqn, const Expr &bc, const Expr &test, const Expr &unk, const Expr &u0, const Expr &params, const Expr &paramVals, const Playa::VectorType< double > &vecType, bool partitionBCs=false)
 NLOp (const RCP< Assembler > &assembler, const Expr &u0)
LinearOperator< double > computeJacobianAndFunction (Vector< double > &functionValue) const
void computeJacobianAndFunction (LinearOperator< double > &J, Vector< double > &resid) const
Expr computeSensitivities (const LinearSolver< double > &solver) const
Expr getU0 () const
Playa::Vector< double > computeFunctionValue () const
void computeFunctionValue (Vector< double > &resid) const
Playa::Vector< double > getInitialGuess () const
LinearOperator< double > allocateJacobian () const
void setInitialGuess (const Expr &u0New)
void reAssembleProblem () const

Handleable interface



RCP< Assemblerassembler_
Playa::LinearOperator< double > J_
Expr u0_
Expr params_
Expr paramVals_
void updateDiscreteFunctionValue (const Vector< double > &vec) const


Detailed Description

NLOp encapsulates a discrete nonlinear problem, and can be passed to a nonlinear solver such as NOX.

Definition at line 56 of file SundanceNLOp.hpp.


Constructor & Destructor Documentation

NLOp::NLOp (  ) 

Empty ctor

Definition at line 66 of file SundanceNLOp.cpp.

References nlpCtorTimer().

NLOp::NLOp ( const Mesh mesh,
const Expr eqn,
const Expr bc,
const Expr test,
const Expr unk,
const Expr u0,
const Playa::VectorType< double > &  vecType,
bool  partitionBCs = false 
)

NLOp::NLOp ( const Mesh mesh,
const Expr eqn,
const Expr bc,
const BlockArray test,
const BlockArray unk,
const Expr u0 
)

NLOp::NLOp ( const Mesh mesh,
const Expr eqn,
const Expr bc,
const Expr test,
const Expr unk,
const Expr u0,
const Expr params,
const Expr paramVals,
const Playa::VectorType< double > &  vecType,
bool  partitionBCs = false 
)

Construct with a mesh, equation set, bcs, test and unknown funcs, parameters, and a vector type

Definition at line 173 of file SundanceNLOp.cpp.

References assembler_, Playa::NonlinearOperatorBase< double >::domain(), Sundance::Expr::flattenSpectral(), nlpCtorTimer(), Playa::NonlinearOperatorBase< double >::range(), and Playa::NonlinearOperatorBase< double >::setDomainAndRange().

NLOp::NLOp ( const RCP< Assembler > &  assembler,
const Expr u0 
)


Member Function Documentation

LinearOperator< double > NLOp::allocateJacobian (  )  const

Create the Jacobian object, but don't fill it in.

Definition at line 248 of file SundanceNLOp.cpp.

References assembler_.

void NLOp::computeFunctionValue ( Vector< double > &  resid  )  const

Vector< double > NLOp::computeFunctionValue (  )  const [virtual]

void NLOp::computeJacobianAndFunction ( LinearOperator< double > &  J,
Vector< double > &  resid 
) const

LinearOperator< double > NLOp::computeJacobianAndFunction ( Vector< double > &  functionValue  )  const [virtual]

Compute the residual and Jacobian at the current evaluation point

Implements Playa::NonlinearOperatorBase< double >.

Definition at line 255 of file SundanceNLOp.cpp.

References Playa::Vector< Scalar >::acceptCopyOf(), assembler_, Playa::NonlinearOperatorBase< double >::currentEvalPt(), J_, and updateDiscreteFunctionValue().

Expr NLOp::computeSensitivities ( const LinearSolver< double > &  solver  )  const

Vector< double > NLOp::getInitialGuess (  )  const [virtual]

Get an initial guess

Implements Playa::NonlinearOperatorBase< double >.

Definition at line 235 of file SundanceNLOp.cpp.

References Sundance::getDiscreteFunctionVector(), and u0_.

Expr Sundance::NLOp::getU0 (  )  const [inline]

Return the current evaluation point as a Sundance expression

Definition at line 102 of file SundanceNLOp.hpp.

References u0_.

void NLOp::reAssembleProblem (  )  const

This function forces the assembler to reassemble the matrix

Definition at line 383 of file SundanceNLOp.cpp.

References assembler_.

void NLOp::setInitialGuess ( const Expr u0New  ) 

void NLOp::updateDiscreteFunctionValue ( const Vector< double > &  vec  )  const [protected]


Member Data Documentation

Playa::LinearOperator<double> Sundance::NLOp::J_ [mutable, private]

Definition at line 134 of file SundanceNLOp.hpp.

Referenced by computeJacobianAndFunction(), and computeSensitivities().

Definition at line 140 of file SundanceNLOp.hpp.

Referenced by computeSensitivities().

Definition at line 143 of file SundanceNLOp.hpp.

Site Contact