From fea0935a949f0f3de36e55ba5ae94aa32fcb8151 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Thu, 11 Jul 2013 15:56:35 +0000 Subject: [PATCH] replace OperatorType by MatrixType and DiscFuncType by VectorType [[Imported from SVN: r11762]] --- .../iterationsteps/trustregiongsstep.cc | 18 +++++++++--------- .../iterationsteps/trustregiongsstep.hh | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dune/solvers/iterationsteps/trustregiongsstep.cc b/dune/solvers/iterationsteps/trustregiongsstep.cc index cd465133..abd405e1 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 b43054b0..eb134d13 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; -- GitLab