From 6628437b48aa48da4d8c83f16b49a6c180d1cc3b Mon Sep 17 00:00:00 2001
From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de>
Date: Thu, 6 Feb 2014 13:21:08 +0000
Subject: [PATCH] [common,geomechanics,mutlidomain,io] reduced excessive line
 lengths, like proposed in #FS213, target line length = 150, thanks to
 kristopherg

reviewed by fetzer


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12431 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/common/dimensionlessnumbers.hh          | 38 ++++++++++++-------
 dumux/common/intersectionmapper.hh            |  3 +-
 dumux/common/start.hh                         |  2 +-
 dumux/geomechanics/el1p2c/el1p2cproperties.hh |  6 ++-
 dumux/geomechanics/el2p/el2pfluxvariables.hh  |  3 +-
 dumux/geomechanics/el2p/el2plocalresidual.hh  | 10 ++++-
 dumux/geomechanics/el2p/el2pproperties.hh     |  3 +-
 dumux/io/interfacemeshcreator.hh              |  9 +++--
 dumux/io/plotoverline2d.hh                    |  5 ++-
 .../common/multidomainassembler.hh            | 20 +++++-----
 10 files changed, 63 insertions(+), 36 deletions(-)

diff --git a/dumux/common/dimensionlessnumbers.hh b/dumux/common/dimensionlessnumbers.hh
index 2daa7cda60..3b3c7201c7 100644
--- a/dumux/common/dimensionlessnumbers.hh
+++ b/dumux/common/dimensionlessnumbers.hh
@@ -58,7 +58,8 @@ public:
  *                              into this function (e.g.: face-area weighted average). [m/s]
  * \param charcteristicLength   Typically, in the context of porous media flow, the mean grain size is taken as the characteristic length
  *                              for calculation of Re. [m]
- * \param kinematicViscosity    Is defined as the dynamic (or absolute) viscosity divided by the density. http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity. [m^2/s]
+ * \param kinematicViscosity    Is defined as the dynamic (or absolute) viscos  ity divided by the density.
+ *                              http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity. [m^2/s]
  *
  * \return                      The Reynolds Number as calculated from the input parameters
  */
@@ -78,13 +79,17 @@ static Scalar reynoldsNumber(const Scalar darcyMagVelocity,
  *          \f[
  *          \textnormal{Pr}= \frac{\nu}{\alpha} = \frac{c_p \mu}{\lambda}\, ,
  *          \f]
- *          with kinematic viscosity\f$\nu\f$, thermal diffusivity \f$\alpha\f$, heat capacity \f$c_p\f$, dynamic viscosity \f$\mu\f$ and thermal conductivity \f$\lambda\f$.
- *          Therefore, Pr is a material specific property (i.e.: not a function of flow directly but only of temperature, pressure and fluid).
+ *          with kinematic viscosity\f$\nu\f$, thermal diffusivity \f$\alpha\f$, heat capacity \f$c_p\f$,
+ *          dynamic viscosity \f$\mu\f$ and thermal conductivity \f$\lambda\f$.
+ *          Therefore, Pr is a material specific property (i.e.: not a function of flow directly
+ *          but only of temperature, pressure and fluid).
  *
  *          source for Prandtl number definition: http://en.wikipedia.org/wiki/Prandtl_number
  *
- * \param dynamicViscosity      Dynamic (absolute) viscosity over density.  http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity [m^2/s]
- * \param heatCapacity          Heat capacity at constant pressure. Specifies the energy change for a given temperature change [J / (kg K)]
+ * \param dynamicViscosity      Dynamic (absolute) viscosity over density.
+ *                              http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity [m^2/s]
+ * \param heatCapacity          Heat capacity at constant pressure.
+ *                              Specifies the energy change for a given temperature change [J / (kg K)]
  * \param thermalConductivity   Conductivity to heat. Specifies how well matter transfers energy without moving. [W/(m K)]
  * \return                      The Prandtl Number as calculated from the input parameters.
  */
@@ -122,12 +127,14 @@ struct NusseltFormulation
  *          (packed bed flow as the chemical engineers call it).
  *
  *          source for Nusselt number definition: http://en.wikipedia.org/wiki/Nusselt_number
- *          source for further empirical correlations for Nusselt Numbers: VDI-Gesellschaft, VDI-Waermeatlas, VDI-Verlag Duesseldorf, 2006
+ *          source for further empirical correlations for Nusselt Numbers:
+ *          VDI-Gesellschaft, VDI-Waermeatlas, VDI-Verlag Duesseldorf, 2006
  *
  * \param reynoldsNumber    Dimensionless number relating inertial and viscous forces [-].
  * \param prandtlNumber     Dimensionless number relating viscosity and thermal diffusivity (temperaturleitfaehigkeit) [-].
  * \param porosity          The fraction of the porous medium which is void space.
- * \param formulation       Switch for deciding which parametrization of the Nusselt number is to be used. Set via the property NusseltFormulation.
+ * \param formulation       Switch for deciding which parametrization of the Nusselt number is to be used.
+ *                          Set via the property NusseltFormulation.
  * \return                  The Nusselt number as calculated from the input parameters [-].
  */
 static Scalar nusseltNumberForced(const Scalar reynoldsNumber,
@@ -136,8 +143,10 @@ static Scalar nusseltNumberForced(const Scalar reynoldsNumber,
                                   const int formulation )
 {
     if (formulation == NusseltFormulation::dittusBoelter){
-       /* example: very common and simple case: flow straight circular pipe, only convection (no boiling), 10000<Re<120000, 0.7<Pr<120, far from pipe entrance, smooth surface of pipe ...
-        Dittus, F.W and Boelter, L.M.K, Heat Transfer in Automobile Radiators of the Tubular Type, Publications in Engineering, Vol. 2, pages 443-461, 1930
+       /* example: very common and simple case: flow straight circular pipe, only convection (no boiling),
+        * 10000<Re<120000, 0.7<Pr<120, far from pipe entrance, smooth surface of pipe ...
+        * Dittus, F.W and Boelter, L.M.K, Heat Transfer in Automobile Radiators of the Tubular Type,
+        * Publications in Engineering, Vol. 2, pages 443-461, 1930
         */
            return 0.023 * pow(reynoldsNumber, 0.8) * pow(prandtlNumber,0.33);
     }
@@ -184,12 +193,14 @@ static Scalar nusseltNumberForced(const Scalar reynoldsNumber,
  *          \f[
  *          \textnormal{Sc}= \frac{\nu}{D} = \frac{\mu}{\rho D}\, ,
  *          \f]
- *          with kinematic viscosity\f$\nu\f$, diffusion coefficient \f$D\f$, dynamic viscosity \f$\mu\f$ and mass density\f$\rho\f$.
- *          Therefore, Sc is a material specific property (i.e.: not a function of flow directly but only of temperature, pressure and fluid).
+ *          with kinematic viscosity\f$\nu\f$, diffusion coefficient \f$D\f$, dynamic viscosity
+ *          \f$\mu\f$ and mass density\f$\rho\f$. Therefore, Sc is a material specific property
+ *          (i.e.: not a function of flow directly but only of temperature, pressure and fluid).
  *
  *          source for Schmidt number definition: http://en.wikipedia.org/wiki/Schmidt_number
  *
- * \param dynamicViscosity      Dynamic (absolute) viscosity over density.  http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity [m^2/s]
+ * \param dynamicViscosity      Dynamic (absolute) viscosity over density.
+ *                              http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity [m^2/s]
  * \param massDensity           Mass density of the considered phase. [kg / m^3]
  * \param diffusionCoefficient  Measure for how well a component can move through a phase due to a concentration gradient. [m^2/s]
  * \return                      The Schmidt Number as calculated from the input parameters.
@@ -234,7 +245,8 @@ struct SherwoodFormulation
  *
  * \param schmidtNumber     Dimensionless number relating viscosity and mass diffusivity [-].
  * \param reynoldsNumber    Dimensionless number relating inertial and viscous forces [-].
- * \param formulation       Switch for deciding which parametrization of the Sherwood number is to be used. Set via the property SherwoodFormulation.
+ * \param formulation       Switch for deciding which parametrization of the Sherwood number is to be used.
+ *                          Set via the property SherwoodFormulation.
  * \return                  The Nusselt number as calculated from the input parameters [-].
  */
 
diff --git a/dumux/common/intersectionmapper.hh b/dumux/common/intersectionmapper.hh
index ff414ad993..5deddd1016 100644
--- a/dumux/common/intersectionmapper.hh
+++ b/dumux/common/intersectionmapper.hh
@@ -56,7 +56,8 @@ class IntersectionMapper
 
 public:
     IntersectionMapper(const GridView& gridview)
-    : gridView_(gridview), elementMapper_(gridView_), size_(gridView_.size(1)), intersectionMapGlobal_(gridView_.size(0)), intersectionMapLocal_(gridView_.size(0))
+    : gridView_(gridview), elementMapper_(gridView_), size_(gridView_.size(1)),
+      intersectionMapGlobal_(gridView_.size(0)), intersectionMapLocal_(gridView_.size(0))
     {
         ElementIterator eIt = gridView_.template begin<0>();
 
diff --git a/dumux/common/start.hh b/dumux/common/start.hh
index d35ce16f8f..fb49ebf295 100644
--- a/dumux/common/start.hh
+++ b/dumux/common/start.hh
@@ -499,7 +499,7 @@ int start_(int argc,
 
     // instantiate and run the concrete problem
     TimeManager timeManager;
-    Problem problem(timeManager, GridCreator::grid().leafView());
+    Problem problem(timeManager, GridCreator::grid().leafGridView());
     timeManager.init(problem, restartTime, dt, tEnd, restart);
     timeManager.run();
     // print dumux end message
diff --git a/dumux/geomechanics/el1p2c/el1p2cproperties.hh b/dumux/geomechanics/el1p2c/el1p2cproperties.hh
index 4d606dedf9..308d4ad77e 100644
--- a/dumux/geomechanics/el1p2c/el1p2cproperties.hh
+++ b/dumux/geomechanics/el1p2c/el1p2cproperties.hh
@@ -60,8 +60,10 @@ NEW_PROP_TAG(SpatialParams); //!< The type of the soil properties object
 NEW_PROP_TAG(UseMoles); //!Defines whether mole (true) or mass (false) fractions are used
 NEW_PROP_TAG(ProblemEnableGravity); //!< Returns whether gravity is considered in the problem
 NEW_PROP_TAG(ImplicitMassUpwindWeight);   //!< The default value of the upwind weight
-NEW_PROP_TAG(ImplicitWithStabilization); //!< Returns whether the stabilization terms are included in the balance equations
-NEW_PROP_TAG(VtkRockMechanicsSignConvention); //!< Returns whether the output should be written according to rock mechanics sign convention (compressive stresses > 0)
+//!< Returns whether the stabilization terms are included in the balance equations
+NEW_PROP_TAG(ImplicitWithStabilization);
+//!< Returns whether the output should be written according to rock mechanics sign convention (compressive stresses > 0)
+NEW_PROP_TAG(VtkRockMechanicsSignConvention);
 }
 // \}
 }
diff --git a/dumux/geomechanics/el2p/el2pfluxvariables.hh b/dumux/geomechanics/el2p/el2pfluxvariables.hh
index 75332e16e6..2d5121bee0 100644
--- a/dumux/geomechanics/el2p/el2pfluxvariables.hh
+++ b/dumux/geomechanics/el2p/el2pfluxvariables.hh
@@ -196,7 +196,8 @@ NEW_PROP_TAG(SpatialParams);
                     // coordDir and for each node i and interpolate values at integration point via the shape function vShape.
                     // TODO: evaluation of prevVolVars should also be possible--> check
                     for (size_t i = 0; i < dispSize; i++){
-                        dU_[coordDir] += (elemVolVars[i].primaryVars()[(numEq - dim)+coordDir] - prevSolutionValues[scalarDispLFS.localIndex(i)])*vShape[i];
+                        dU_[coordDir] += (elemVolVars[i].primaryVars()[(numEq - dim)+coordDir]
+                                          - prevSolutionValues[scalarDispLFS.localIndex(i)])*vShape[i];
                     }
                 }
             }
diff --git a/dumux/geomechanics/el2p/el2plocalresidual.hh b/dumux/geomechanics/el2p/el2plocalresidual.hh
index 7b23aa2f22..8205335127 100644
--- a/dumux/geomechanics/el2p/el2plocalresidual.hh
+++ b/dumux/geomechanics/el2p/el2plocalresidual.hh
@@ -40,7 +40,9 @@ namespace Dumux {
 template<class TypeTag>
 class ElTwoPLocalResidual: public BoxLocalResidual<TypeTag> {
 protected:
-    typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) Implementation;typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
+    typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) Implementation;
+    typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
+    typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
 
     enum {
         dim = GridView::dimension
@@ -49,7 +51,11 @@ protected:
     typedef Dune::FieldMatrix<Scalar, dim, dim> DimMatrix;
     typedef Dune::FieldVector<Scalar, dim> DimVector;
 
-    typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
+    typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
+    typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;
+    typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
+    typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
+    typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
 
     enum {
         numFluidPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases))
diff --git a/dumux/geomechanics/el2p/el2pproperties.hh b/dumux/geomechanics/el2p/el2pproperties.hh
index bf2bba91bb..8135d42881 100644
--- a/dumux/geomechanics/el2p/el2pproperties.hh
+++ b/dumux/geomechanics/el2p/el2pproperties.hh
@@ -67,7 +67,8 @@ NEW_PROP_TAG(GridOperatorSpace); //!< The grid operator space
 NEW_PROP_TAG(GridOperator); //!< The grid operator space
 NEW_PROP_TAG(PressureFEM); //!< FE space used for pressure, saturation, ...
 NEW_PROP_TAG(DisplacementFEM); //!< FE space used for displacement
-NEW_PROP_TAG(VtkRockMechanicsSignConvention); //!< Returns whether the output should be written according to rock mechanics sign convention (compressive stresses > 0)
+NEW_PROP_TAG(VtkRockMechanicsSignConvention); //!< Returns whether the output should be written according to
+                                              //!< rock mechanics sign convention (compressive stresses > 0)
 
 //! Specifies the grid function space used for sub-problems
 NEW_PROP_TAG(GridFunctionSpace);
diff --git a/dumux/io/interfacemeshcreator.hh b/dumux/io/interfacemeshcreator.hh
index b86552a28f..b137c96008 100644
--- a/dumux/io/interfacemeshcreator.hh
+++ b/dumux/io/interfacemeshcreator.hh
@@ -89,7 +89,8 @@ std::cout << "rglobal = " << refinePoint << ", rlocal = " << refinePointLocal <<
             }
             else if (lengthLeft > 0.5)
             {
-                Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0*pow(gradingFactors[comp], numElements[comp])*lengthRight/lengthLeft))
+                Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactors[comp], numElements[comp])
+                                                                      * lengthRight/lengthLeft))
                             /(2.0*pow(gradingFactors[comp], numElements[comp])))/log(gradingFactors[comp]));
                 nLeft = std::min((int)std::ceil(nLeftDouble), numElements[comp]);
 
@@ -105,7 +106,8 @@ std::cout << "rglobal = " << refinePoint << ", rlocal = " << refinePointLocal <<
             }
             else
             {
-                Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0*pow(gradingFactors[comp], numElements[comp])*lengthLeft/lengthRight))
+                Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactors[comp], numElements[comp])
+                                                             * lengthLeft/lengthRight))
                             /(2.0*pow(gradingFactors[comp], numElements[comp])))/log(gradingFactors[comp]);
                 nRight = std::min((int)std::ceil(nRightDouble), numElements[comp]);
 
@@ -119,7 +121,8 @@ std::cout << "rglobal = " << refinePoint << ", rlocal = " << refinePointLocal <<
                 else
                     hLeft = hRight = 1.0/numElements[comp];
             }
-std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight << ", hLeft = " << hLeft << ", hRight = " << hRight << ", nLeft = " << nLeft << ", nRight = " << nRight << std::endl;
+std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight << ", hLeft = " << hLeft <<
+             ", hRight = " << hRight << ", nLeft = " << nLeft << ", nRight = " << nRight << std::endl;
 
             int numVertices = numElements[comp] + 1;
             localPositions[comp].resize(numVertices);
diff --git a/dumux/io/plotoverline2d.hh b/dumux/io/plotoverline2d.hh
index c3f4674fa4..c2d7de4b4d 100644
--- a/dumux/io/plotoverline2d.hh
+++ b/dumux/io/plotoverline2d.hh
@@ -74,7 +74,8 @@ public:
      *
      *        The writer needs to be called in postTimeStep().
      *
-     *        This function puts output variables (TemperaturePhase, Saturation, t, tIndex, ...) over space (1D, over a line) into a text file,
+     *        This function puts output variables (TemperaturePhase, Saturation, t, tIndex, ...)
+     *        over space (1D, over a line) into a text file,
      *        so they can be read in by another program like matlab.
      *        The file can be found by the extension: dat
      */
@@ -142,7 +143,7 @@ public:
                     dataFile << "# This output file was generated from code compiled at " << __TIME__ <<", "<< __DATE__<< "\n";
                     dataFile << "\n";
                     dataFile << "# Header\n";
-                    dataFile << "#timestep\t time\t\t \t\t x \t\t y  \t\tSw \t\t\t Tw\t\t Tn\t Ts \t xH2On \t xH2OnEquil \t xN2w \txN2wEquil " << std::endl;
+                    dataFile << "#timestep\t time\t\t \t\t x \t\t y  \t\tSw \t\t\t Tw\t\t Tn\t Ts \t xH2On \t xH2OnEquil \t xN2w \txN2wEquil\n";
                     dataFile.close();
                 }
 
diff --git a/dumux/multidomain/common/multidomainassembler.hh b/dumux/multidomain/common/multidomainassembler.hh
index 5274f0ac87..a9d61b0a7e 100644
--- a/dumux/multidomain/common/multidomainassembler.hh
+++ b/dumux/multidomain/common/multidomainassembler.hh
@@ -128,11 +128,9 @@ public:
         constraints2_ = Dune::make_shared<Constraints2>();
 
         scalarGridFunctionSpace1_ = Dune::make_shared<ScalarGridFunctionSpace1>(globalProblem_->sdGridView1(),
-        																		*fem1_,
-        																		*constraints1_);
+                                                                                *fem1_, *constraints1_);
         scalarGridFunctionSpace2_ = Dune::make_shared<ScalarGridFunctionSpace2>(globalProblem_->sdGridView2(),
-        																		*fem2_,
-        																		*constraints2_);
+                                                                                *fem2_, *constraints2_);
         // constraints store indices of ghost dofs
         constraints1_->compute_ghosts(*scalarGridFunctionSpace1_);
         constraints2_->compute_ghosts(*scalarGridFunctionSpace2_);
@@ -144,8 +142,8 @@ public:
         gridFunctionSpace2_ = Dune::make_shared<GridFunctionSpace2>(*scalarGridFunctionSpace2_);
 
         mdGridFunctionSpace_ = Dune::make_shared<MultiDomainGridFunctionSpace>(globalProblem_->mdGrid(),
-        											   *gridFunctionSpace1_,
-        											   *gridFunctionSpace2_);
+                                                                               *gridFunctionSpace1_,
+                                                                               *gridFunctionSpace2_);
 
         localOperator1_ = Dune::make_shared<LocalOperator1>(sdProblem1_->model());
         localOperator2_ = Dune::make_shared<LocalOperator2>(sdProblem2_->model());
@@ -164,13 +162,15 @@ public:
 
         NoDirichletConstraints dirichletVal;
         auto constraints = Dune::PDELab::MultiDomain::constraints<Scalar>(*mdGridFunctionSpace_,
-                                                                          Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem1_,dirichletVal),
-                                                                          Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem2_,dirichletVal));
+                                                                          Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem1_,
+                                                                                                                         dirichletVal),
+                                                                          Dune::PDELab::MultiDomain::constrainSubProblem(*mdSubProblem2_,
+                                                                                                                         dirichletVal));
         constraints.assemble(*constraintsTrafo_);
 
         mdGridOperator_ = Dune::make_shared<MultiDomainGridOperator>(*mdGridFunctionSpace_, *mdGridFunctionSpace_,
-        									 *constraintsTrafo_, *constraintsTrafo_,
-        									 *mdSubProblem1_, *mdSubProblem2_, *mdCoupling_);
+                                                                     *constraintsTrafo_, *constraintsTrafo_,
+                                                                     *mdSubProblem1_, *mdSubProblem2_, *mdCoupling_);
 
         matrix_ = Dune::make_shared<JacobianMatrix>(*mdGridOperator_);
         *matrix_ = 0;
-- 
GitLab