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 ¶ms, const Expr ¶mVals, 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< Assembler > | assembler_ |
Playa::LinearOperator< double > | J_ |
Expr | u0_ |
Expr | params_ |
Expr | paramVals_ |
void | updateDiscreteFunctionValue (const Vector< double > &vec) const |
Definition at line 56 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 Playa::VectorType< double > & | vecType, | |||
bool | partitionBCs = false | |||
) |
Construct with a mesh, equation set, bcs, test and unknown funcs, and a vector type
Definition at line 77 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 Mesh & | mesh, | |
const Expr & | eqn, | |||
const Expr & | bc, | |||
const BlockArray & | test, | |||
const BlockArray & | unk, | |||
const Expr & | u0 | |||
) |
Construct with a mesh, equation set, bcs, test and unknown funcs, and a vector type
Definition at line 115 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 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().
Definition at line 213 of file SundanceNLOp.cpp.
References assembler_, Playa::NonlinearOperatorBase< double >::domain(), nlpCtorTimer(), Playa::NonlinearOperatorBase< double >::range(), and Playa::NonlinearOperatorBase< double >::setDomainAndRange().
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 |
Write the residual into the object provided
Definition at line 319 of file SundanceNLOp.cpp.
References Playa::Vector< Scalar >::acceptCopyOf(), assembler_, Playa::NonlinearOperatorBase< double >::currentEvalPt(), Playa::Handle< PointerType >::ptr(), and updateDiscreteFunctionValue().
Vector< double > NLOp::computeFunctionValue | ( | ) | const [virtual] |
Compute the residual at the current eval point
Reimplemented from Playa::NonlinearOperatorBase< double >.
Definition at line 297 of file SundanceNLOp.cpp.
References Playa::Vector< Scalar >::acceptCopyOf(), assembler_, Playa::VectorSpace< Scalar >::createMember(), Playa::NonlinearOperatorBase< double >::currentEvalPt(), Playa::NonlinearOperatorBase< double >::range(), and updateDiscreteFunctionValue().
void NLOp::computeJacobianAndFunction | ( | LinearOperator< double > & | J, | |
Vector< double > & | resid | |||
) | const |
Write the Jacobian and residual into the objects provided
Definition at line 268 of file SundanceNLOp.cpp.
References Playa::Vector< Scalar >::acceptCopyOf(), assembler_, Playa::NonlinearOperatorBase< double >::currentEvalPt(), J_, Playa::Handle< PointerType >::ptr(), and updateDiscreteFunctionValue().
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 |
Compute direct sensitivities to parameters
Definition at line 346 of file SundanceNLOp.cpp.
References assembler_, Playa::NonlinearOperatorBase< double >::currentEvalPt(), J_, params_, Playa::Handle< PointerType >::ptr(), Sundance::Expr::size(), Sundance::LinearSolveDriver::solve(), Sundance::Expr::toString(), Sundance::toString(), u0_, and updateDiscreteFunctionValue().
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 | ) |
Set an initial guess
Definition at line 240 of file SundanceNLOp.cpp.
References Sundance::getDiscreteFunctionVector(), Playa::NonlinearOperatorBase< double >::setEvalPt(), and updateDiscreteFunctionValue().
void NLOp::updateDiscreteFunctionValue | ( | const Vector< double > & | vec | ) | const [protected] |
Definition at line 230 of file SundanceNLOp.cpp.
References Playa::Vector< Scalar >::copy(), Sundance::setDiscreteFunctionVector(), and u0_.
Referenced by computeFunctionValue(), computeJacobianAndFunction(), computeSensitivities(), and setInitialGuess().
RCP<Assembler> Sundance::NLOp::assembler_ [private] |
Definition at line 131 of file SundanceNLOp.hpp.
Referenced by allocateJacobian(), computeFunctionValue(), computeJacobianAndFunction(), computeSensitivities(), NLOp(), and reAssembleProblem().
Playa::LinearOperator<double> Sundance::NLOp::J_ [mutable, private] |
Definition at line 134 of file SundanceNLOp.hpp.
Referenced by computeJacobianAndFunction(), and computeSensitivities().
Expr Sundance::NLOp::params_ [private] |
Expr Sundance::NLOp::paramVals_ [private] |
Definition at line 143 of file SundanceNLOp.hpp.
Expr Sundance::NLOp::u0_ [private] |
Definition at line 137 of file SundanceNLOp.hpp.
Referenced by computeSensitivities(), getInitialGuess(), getU0(), and updateDiscreteFunctionValue().