diff --git a/opm/elasticity/asmhandler.hpp b/opm/elasticity/asmhandler.hpp index 54039b1..a1fe4a6 100644 --- a/opm/elasticity/asmhandler.hpp +++ b/opm/elasticity/asmhandler.hpp @@ -110,7 +110,12 @@ class ASMHandler { const Dune::FieldVector* S, const LeafIterator& cell, Vector* b=NULL); - void addMatElement(int i,int j,double val){ A[i][j] += val;} + + void addMatElement(const int i, const int j, const double val) + { + A[i][j] += val; + } + //! \brief Extract values corresponding to cell //! \param[in] u The global load vector //! \param[in] it An iterator to the cell we want to extract values for diff --git a/opm/elasticity/elasticity_impl.hpp b/opm/elasticity/elasticity_impl.hpp index f975e0a..2cc00ae 100644 --- a/opm/elasticity/elasticity_impl.hpp +++ b/opm/elasticity/elasticity_impl.hpp @@ -81,7 +81,7 @@ void Elasticity::getBVector(Dune::FieldVector& Bvector = P1ShapeFunctionSet::instance(); Dune::FieldMatrix N; - for (int i=0;i < funcdims; i++){ + for (int i = 0; i < funcdims; i++) { Bvector[i] = basis[i].evaluateFunction(point); } } diff --git a/opm/elasticity/meshcolorizer.hpp b/opm/elasticity/meshcolorizer.hpp index 45a565b..77454ab 100644 --- a/opm/elasticity/meshcolorizer.hpp +++ b/opm/elasticity/meshcolorizer.hpp @@ -44,14 +44,16 @@ class MeshColorizer { } //! \brief Calculate the coloring - void calcGroups(){ - tg[0].resize(1); - tg[0].reserve(grid.size(0)); - for (int i = 0; i < grid.size(0); ++i) - tg[0][0].push_back(i); - tg[1].clear(); - + void calcGroups() + { + tg[0].resize(1); + tg[0].reserve(grid.size(0)); + for (int i = 0; i < grid.size(0); ++i) { + tg[0][0].push_back(i); + } + tg[1].clear(); } + private: IntMat tg[2]; //!< The color groups const GridType& grid; //!< Reference to grid being colored