diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index aba33a61fc86c2ef6343a3f7c812e0eb92a62ec8..0cca14877a61ecff4821a24c146e609b26b25622 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -28,7 +28,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { /** \brief Solves one local system using a modified gradient method */ class IterateObject; - MyBlockProblem(MyConvexProblemType& problem) : problem(problem) { + MyBlockProblem(MyConvexProblemType &problem) : problem(problem) { bisection = Bisection(0.0, 1.0, 1e-12, true, 0); }; @@ -37,7 +37,7 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { private: // problem data - MyConvexProblemType& problem; + MyConvexProblemType &problem; // commonly used minimization stuff Bisection bisection; @@ -53,18 +53,18 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { * \param bisection The class used to do a scalar bisection * \param problem The problem including quadratic part and nonlinear part */ - IterateObject(Bisection const& bisection, MyConvexProblemType& problem) + IterateObject(Bisection const &bisection, MyConvexProblemType &problem) : problem(problem), bisection(bisection) {} public: /** \brief Set the current iterate */ - void setIterate(VectorType& u) { + void setIterate(VectorType &u) { this->u = u; return; } /** \brief Update the i-th block of the current iterate */ - void updateIterate(LocalVectorType const& ui, int i) { + void updateIterate(LocalVectorType const &ui, int i) { u[i] = ui; return; } @@ -75,14 +75,14 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { * \param ignore Set of degrees of freedom to leave untouched */ void solveLocalProblem( - LocalVectorType& ui, int m, + LocalVectorType &ui, int m, const typename Dune::BitSetVector<block_size>::const_reference ignore) { { // TODO: Does it make any sense to ignore single spatial dimensions here? if (ignore.test(0)) return; - LocalMatrixType const* localA = NULL; + LocalMatrixType const *localA = NULL; LocalVectorType localb(problem.f[m]); typename MatrixType::row_type::ConstIterator it; @@ -108,7 +108,7 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { private: // problem data - MyConvexProblemType& problem; + MyConvexProblemType &problem; // commonly used minimization stuff Bisection bisection; diff --git a/dune/tectonic/nicefunction.hh b/dune/tectonic/nicefunction.hh index 81f3894c0193e5f4fc6df7c7e6db108753623528..a3614c03fe242b97015a62813ac0692aeaf0f600 100644 --- a/dune/tectonic/nicefunction.hh +++ b/dune/tectonic/nicefunction.hh @@ -22,7 +22,7 @@ class LinearFunction : public NiceFunction { LinearFunction(double a) : coefficient(a) {} - void virtual evaluate(double const& x, double& y) const { + void virtual evaluate(double const &x, double &y) const { y = coefficient * x; } @@ -36,7 +36,7 @@ class LinearFunction : public NiceFunction { template <int slope> class SampleFunction : public NiceFunction { public: - void virtual evaluate(double const& x, double& y) const { + void virtual evaluate(double const &x, double &y) const { y = (x < 1) ? x : (slope * (x - 1) + 1); } @@ -51,7 +51,7 @@ template <int slope> class SampleFunction : public NiceFunction { class SteepFunction : public NiceFunction { public: - void virtual evaluate(double const& x, double& y) const { y = 100 * x; } + void virtual evaluate(double const &x, double &y) const { y = 100 * x; } double virtual leftDifferential(double s) const { return 100; } @@ -60,7 +60,7 @@ class SteepFunction : public NiceFunction { class TrivialFunction : public NiceFunction { public: - void virtual evaluate(double const& x, double& y) const { y = 0; } + void virtual evaluate(double const &x, double &y) const { y = 0; } double virtual leftDifferential(double) const { return 0; } @@ -70,7 +70,7 @@ class TrivialFunction : public NiceFunction { // slope in [n-1,n] is n class HorribleFunction : public NiceFunction { public: - void virtual evaluate(double const& x, double& y) const { + void virtual evaluate(double const &x, double &y) const { double const fl = floor(x); double const sum = fl * (fl + 1) / 2; y = sum + (fl + 1) * (x - fl); @@ -96,7 +96,7 @@ class HorribleFunction : public NiceFunction { // slope in [n-1,n] is log(n+1) class HorribleFunctionLogarithmic : public NiceFunction { public: - void virtual evaluate(double const& x, double& y) const { + void virtual evaluate(double const &x, double &y) const { y = 0; size_t const fl = floor(x); for (size_t i = 1; i <= fl;) diff --git a/dune/vtkgridfunction.hh b/dune/vtkgridfunction.hh index 09d67faeba2b85db9ff43e4cfadddc1e56d61042..b9433ad4153bc48cbfa1b8eaccf63de10cb73d9c 100644 --- a/dune/vtkgridfunction.hh +++ b/dune/vtkgridfunction.hh @@ -30,8 +30,8 @@ class VTKBasisGridFunction : public VTKFunction<typename Basis::GridView> { * \param v A corresponding vector of coefficients. * \param s A name of the function. */ - VTKBasisGridFunction(const Basis& basis, const CoefficientType& v, - const std::string& s) + VTKBasisGridFunction(const Basis &basis, const CoefficientType &v, + const std::string &s) : basis_(basis), coeffs_(v), s_(s) { if (v.size() != basis_.size()) DUNE_THROW( @@ -48,10 +48,10 @@ class VTKBasisGridFunction : public VTKFunction<typename Basis::GridView> { * \param e The element the local coordinates are taken from. * \param xi The local coordinates where to evaluate the function. */ - virtual double evaluate(int comp, const Entity& e, - const Dune::FieldVector<ctype, dim>& xi) const { + virtual double evaluate(int comp, const Entity &e, + const Dune::FieldVector<ctype, dim> &xi) const { // evaluate the local shapefunctions - const typename Basis::LocalFiniteElement& localFE = + const typename Basis::LocalFiniteElement &localFE = basis_.getLocalFiniteElement(e); std::vector<RangeType> values(localFE.localBasis().size()); localFE.localBasis().evaluateFunction(xi, values); @@ -71,8 +71,8 @@ class VTKBasisGridFunction : public VTKFunction<typename Basis::GridView> { virtual ~VTKBasisGridFunction() {} private: - const Basis& basis_; - const CoefficientType& coeffs_; + const Basis &basis_; + const CoefficientType &coeffs_; std::string s_; }; }