Skip to content
Snippets Groups Projects
Commit df92b932 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Properly setup the shared_ptr member

parent c3632f6c
No related branches found
No related tags found
No related merge requests found
...@@ -34,8 +34,10 @@ public: ...@@ -34,8 +34,10 @@ public:
//! Constructor that gets the quadratic energy functional x^T mat x - rhs^T*x, and the initial iterate //! Constructor that gets the quadratic energy functional x^T mat x - rhs^T*x, and the initial iterate
ProjectedGradientStep(const MatrixType& mat, VectorType& x, const VectorType& rhs) ProjectedGradientStep(const MatrixType& mat, VectorType& x, const VectorType& rhs)
: Base(x), mat_(mat), rhs_(rhs) : Base(x), rhs_(&rhs)
{} {
mat_ = Dune::stackobject_to_shared_ptr(mat);
}
/** \brief Compute the generalized Cauchy point along a given direction. This is sometimes needed in /** \brief Compute the generalized Cauchy point along a given direction. This is sometimes needed in
* nonlinear programming where this direction then corresponds to the gradient of the nonlinear function * nonlinear programming where this direction then corresponds to the gradient of the nonlinear function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment