Skip to content
Snippets Groups Projects
Commit bb9e0e31 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

foo& bar -> foo &bar

parent 2f30c080
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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;)
......
......@@ -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_;
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment