NLOp encapsulates a discrete nonlinear problem, and can be passed to a nonlinear solver such as NOX. More...
Public Member Functions | |
| NLOp () | |
| Empty ctor. | |
| NLOp (const Mesh &mesh, const Expr &eqn, const Expr &bc, const Expr &test, const Expr &unk, const Expr &u0, const TSFExtended::VectorType< double > &vecType, bool partitionBCs=false) | |
| Construct with a mesh, equation set, bcs, test and unknown funcs, and a vector type. | |
| NLOp (const Mesh &mesh, const Expr &eqn, const Expr &bc, const Expr &test, const Expr &unk, const Expr &u0, const Expr ¶ms, const Expr ¶mVals, const TSFExtended::VectorType< double > &vecType, bool partitionBCs=false) | |
| Construct with a mesh, equation set, bcs, test and unknown funcs, parameters, and a vector type. | |
| NLOp (const RCP< Assembler > &assembler, const Expr &u0) | |
| LinearOperator< double > | computeJacobianAndFunction (Vector< double > &functionValue) const |
| Compute the residual and Jacobian at the current evaluation point. | |
| void | computeJacobianAndFunction (LinearOperator< double > &J, Vector< double > &resid) const |
| Write the Jacobian and residual into the objects provided. | |
| Expr | computeSensitivities (const LinearSolver< double > &solver) const |
| Compute direct sensitivities to parameters. | |
| Expr | getU0 () const |
| Return the current evaluation point as a Sundance expression. | |
| TSFExtended::Vector< double > | computeFunctionValue () const |
| Compute the residual at the current eval point. | |
| void | computeFunctionValue (Vector< double > &resid) const |
| Write the residual into the object provided. | |
| TSFExtended::Vector< double > | getInitialGuess () const |
| Get an initial guess. | |
| LinearOperator< double > | allocateJacobian () const |
| Create the Jacobian object, but don't fill it in. | |
| void | setInitialGuess (const Expr &u0New) |
| Set an initial guess. | |
Private Attributes | |
Handleable interface | |
| RCP< Assembler > | assembler_ |
| TSFExtended::LinearOperator < double > | J_ |
| Expr | u0_ |
| Expr | params_ |
| Expr | paramVals_ |
| DiscreteFunction * | discreteU0_ |
NLOp encapsulates a discrete nonlinear problem, and can be passed to a nonlinear solver such as NOX.
Definition at line 55 of file SundanceNLOp.hpp.
| NLOp::NLOp | ( | ) |
| NLOp::NLOp | ( | const Mesh & | mesh, |
| const Expr & | eqn, | ||
| const Expr & | bc, | ||
| const Expr & | test, | ||
| const Expr & | unk, | ||
| const Expr & | u0, | ||
| const TSFExtended::VectorType< double > & | vecType, | ||
| bool | partitionBCs = false |
||
| ) |
Construct with a mesh, equation set, bcs, test and unknown funcs, and a vector type.
Definition at line 76 of file SundanceNLOp.cpp.
References assembler_, discreteU0_, TSFExtended::NonlinearOperatorBase< double >::domain(), Sundance::Expr::flattenSpectral(), nlpCtorTimer(), Sundance::Handle< PointerType >::ptr(), TSFExtended::NonlinearOperatorBase< double >::range(), TSFExtended::NonlinearOperatorBase< double >::setDomainAndRange(), and 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 TSFExtended::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 120 of file SundanceNLOp.cpp.
References assembler_, discreteU0_, TSFExtended::NonlinearOperatorBase< double >::domain(), Sundance::Expr::flattenSpectral(), nlpCtorTimer(), Sundance::Handle< PointerType >::ptr(), TSFExtended::NonlinearOperatorBase< double >::range(), TSFExtended::NonlinearOperatorBase< double >::setDomainAndRange(), and u0_.
Definition at line 168 of file SundanceNLOp.cpp.
References assembler_, discreteU0_, TSFExtended::NonlinearOperatorBase< double >::domain(), nlpCtorTimer(), Sundance::Handle< PointerType >::ptr(), TSFExtended::NonlinearOperatorBase< double >::range(), TSFExtended::NonlinearOperatorBase< double >::setDomainAndRange(), and u0_.
| LinearOperator< double > NLOp::allocateJacobian | ( | ) | const |
Create the Jacobian object, but don't fill it in.
Definition at line 210 of file SundanceNLOp.cpp.
References assembler_.
| Vector< double > NLOp::computeFunctionValue | ( | ) | const [virtual] |
Compute the residual at the current eval point.
Reimplemented from TSFExtended::NonlinearOperatorBase< double >.
Definition at line 278 of file SundanceNLOp.cpp.
References TSFExtended::Vector< Scalar >::acceptCopyOf(), assembler_, TSFExtended::NonlinearOperatorBase< double >::currentEvalPt(), discreteU0_, TSFExtended::NonlinearOperatorBase< double >::range(), and Sundance::DiscreteFunction::setVector().
| void NLOp::computeFunctionValue | ( | Vector< double > & | resid | ) | const |
Write the residual into the object provided.
Definition at line 307 of file SundanceNLOp.cpp.
References TSFExtended::Vector< Scalar >::acceptCopyOf(), assembler_, TSFExtended::NonlinearOperatorBase< double >::currentEvalPt(), discreteU0_, Sundance::Handle< PointerType >::ptr(), and Sundance::DiscreteFunction::setVector().
| LinearOperator< double > NLOp::computeJacobianAndFunction | ( | Vector< double > & | functionValue | ) | const [virtual] |
Compute the residual and Jacobian at the current evaluation point.
Implements TSFExtended::NonlinearOperatorBase< double >.
Definition at line 217 of file SundanceNLOp.cpp.
References TSFExtended::Vector< Scalar >::acceptCopyOf(), assembler_, TSFExtended::NonlinearOperatorBase< double >::currentEvalPt(), discreteU0_, J_, and Sundance::DiscreteFunction::setVector().
| void NLOp::computeJacobianAndFunction | ( | LinearOperator< double > & | J, |
| Vector< double > & | resid | ||
| ) | const |
Write the Jacobian and residual into the objects provided.
Definition at line 241 of file SundanceNLOp.cpp.
References TSFExtended::Vector< Scalar >::acceptCopyOf(), assembler_, TSFExtended::NonlinearOperatorBase< double >::currentEvalPt(), discreteU0_, J_, Sundance::Handle< PointerType >::ptr(), and Sundance::DiscreteFunction::setVector().
| Expr NLOp::computeSensitivities | ( | const LinearSolver< double > & | solver | ) | const |
Compute direct sensitivities to parameters.
Definition at line 338 of file SundanceNLOp.cpp.
References assembler_, TSFExtended::NonlinearOperatorBase< double >::currentEvalPt(), discreteU0_, J_, params_, Sundance::Handle< PointerType >::ptr(), Sundance::DiscreteFunction::setVector(), Sundance::Expr::size(), Sundance::LinearSolveDriver::solve(), Sundance::Expr::toString(), Sundance::toString(), and u0_.
| TSFExtended::Vector< double > NLOp::getInitialGuess | ( | ) | const [virtual] |
Get an initial guess.
Implements TSFExtended::NonlinearOperatorBase< double >.
Definition at line 190 of file SundanceNLOp.cpp.
References discreteU0_, and Sundance::DiscreteFunction::getVector().
| Expr Sundance::NLOp::getU0 | ( | ) | const [inline] |
Return the current evaluation point as a Sundance expression.
Definition at line 95 of file SundanceNLOp.hpp.
References u0_.
| void NLOp::setInitialGuess | ( | const Expr & | u0New | ) |
Set an initial guess.
Definition at line 201 of file SundanceNLOp.cpp.
References TSFExtended::Vector< Scalar >::copy(), TSFExtended::NonlinearOperatorBase< double >::currentEvalPt(), Sundance::DiscreteFunction::discFunc(), discreteU0_, Sundance::DiscreteFunction::getVector(), TSFExtended::NonlinearOperatorBase< double >::setEvalPt(), and Sundance::DiscreteFunction::setVector().
RCP<Assembler> Sundance::NLOp::assembler_ [private] |
Definition at line 119 of file SundanceNLOp.hpp.
Referenced by allocateJacobian(), computeFunctionValue(), computeJacobianAndFunction(), computeSensitivities(), and NLOp().
DiscreteFunction* Sundance::NLOp::discreteU0_ [mutable, private] |
Definition at line 134 of file SundanceNLOp.hpp.
Referenced by computeFunctionValue(), computeJacobianAndFunction(), computeSensitivities(), getInitialGuess(), NLOp(), and setInitialGuess().
TSFExtended::LinearOperator<double> Sundance::NLOp::J_ [mutable, private] |
Definition at line 122 of file SundanceNLOp.hpp.
Referenced by computeJacobianAndFunction(), and computeSensitivities().
Expr Sundance::NLOp::params_ [private] |
Definition at line 128 of file SundanceNLOp.hpp.
Referenced by computeSensitivities().
Expr Sundance::NLOp::paramVals_ [private] |
Definition at line 131 of file SundanceNLOp.hpp.
Expr Sundance::NLOp::u0_ [private] |
Definition at line 125 of file SundanceNLOp.hpp.
Referenced by computeSensitivities(), getU0(), and NLOp().