diff --git a/dune/solvers/iterationsteps/trustregiongsstep.cc b/dune/solvers/iterationsteps/trustregiongsstep.cc index cd465133a47ef1e3731dcb578b33c04cfd47ae8a..abd405e1907e3903a399ebce74554199c6a2a44a 100644 --- a/dune/solvers/iterationsteps/trustregiongsstep.cc +++ b/dune/solvers/iterationsteps/trustregiongsstep.cc @@ -1,18 +1,18 @@ -template<class OperatorType, class DiscFuncType> +template<class MatrixType, class VectorType> inline -DiscFuncType TrustRegionGSStep<OperatorType, DiscFuncType>::getSol() +VectorType TrustRegionGSStep<MatrixType, VectorType>::getSol() { return *(this->x_); } -template<class OperatorType, class DiscFuncType> +template<class MatrixType, class VectorType> inline -typename DiscFuncType::field_type TrustRegionGSStep<OperatorType, DiscFuncType>:: +typename VectorType::field_type TrustRegionGSStep<MatrixType, VectorType>:: residual(unsigned int index, int blockIndex) const { - const OperatorType& mat = *this->mat_; + const MatrixType& mat = *this->mat_; - typedef typename OperatorType::row_type RowType; + typedef typename MatrixType::row_type RowType; typedef typename RowType::ConstIterator ColumnIterator; /* The following loop computes @@ -42,11 +42,11 @@ residual(unsigned int index, int blockIndex) const } -template<class OperatorType, class DiscFuncType> +template<class MatrixType, class VectorType> inline -void TrustRegionGSStep<OperatorType, DiscFuncType>::iterate() +void TrustRegionGSStep<MatrixType, VectorType>::iterate() { - const OperatorType& mat = *this->mat_; + const MatrixType& mat = *this->mat_; const std::vector<BoxConstraint<field_type,blocksize> >& obstacles = *this->obstacles_; // Debug: check for energy decrease diff --git a/dune/solvers/iterationsteps/trustregiongsstep.hh b/dune/solvers/iterationsteps/trustregiongsstep.hh index b43054b072bfcbfe20baabdfda2486c549523c1f..eb134d13f43c36ae3086817c06cb87ec43d717b2 100644 --- a/dune/solvers/iterationsteps/trustregiongsstep.hh +++ b/dune/solvers/iterationsteps/trustregiongsstep.hh @@ -12,15 +12,15 @@ /** \brief A Gauss-Seidel iterator which does not assume that the functional is convex, but which expects a bounded admissible set. */ - template<class OperatorType, class DiscFuncType> - class TrustRegionGSStep : public ProjectedBlockGSStep<OperatorType, DiscFuncType> + template<class MatrixType, class VectorType> + class TrustRegionGSStep : public ProjectedBlockGSStep<MatrixType, VectorType> { - typedef typename DiscFuncType::block_type VectorBlock; + typedef typename VectorType::block_type VectorBlock; enum {blocksize = VectorBlock::dimension}; - typedef typename DiscFuncType::field_type field_type; + typedef typename VectorType::field_type field_type; public: @@ -28,14 +28,14 @@ TrustRegionGSStep() {} //! Constructor with a linear problem - TrustRegionGSStep(OperatorType& mat, DiscFuncType& x, DiscFuncType& rhs) - : LinearIterationStep<OperatorType,DiscFuncType>(mat, x, rhs) + TrustRegionGSStep(MatrixType& mat, VectorType& x, VectorType& rhs) + : LinearIterationStep<MatrixType,VectorType>(mat, x, rhs) {} //! Perform one iteration virtual void iterate(); - virtual DiscFuncType getSol(); + virtual VectorType getSol(); field_type residual(unsigned int index, int blockIndex) const;