From 1305d456a6d6b8a47700ed6366cd1269d0d8fff6 Mon Sep 17 00:00:00 2001 From: Rene Milk <rene.milk@wwu.de> Date: Fri, 5 Feb 2016 12:01:48 +0100 Subject: [PATCH] applies clang-format --- dune/xt/functions/ESV2007.hh | 4 ++-- dune/xt/functions/affine.hh | 2 +- dune/xt/functions/checkerboard.hh | 6 +++--- dune/xt/functions/combined.hh | 12 ++++++------ dune/xt/functions/expression.hh | 14 ++++++++------ dune/xt/functions/flattop.hh | 7 ++++--- dune/xt/functions/indicator.hh | 8 +++++--- dune/xt/functions/interfaces.hh | 3 ++- dune/xt/functions/spe10/model1.hh | 6 +++--- dune/xt/functions/spe10/model2.hh | 2 +- dune/xt/functions/test/functions.hh | 4 ++-- 11 files changed, 37 insertions(+), 31 deletions(-) diff --git a/dune/xt/functions/ESV2007.hh b/dune/xt/functions/ESV2007.hh index 2df374a37..3942a2247 100644 --- a/dune/xt/functions/ESV2007.hh +++ b/dune/xt/functions/ESV2007.hh @@ -360,7 +360,7 @@ public: } CutoffFunction(const DiffusionType& diffusion, const RangeFieldType poincare_constant = 1.0 / (M_PIl * M_PIl), - const std::string nm = static_id()) + const std::string nm = static_id()) : diffusion_(diffusion) , poincare_constant_(poincare_constant) , name_(nm) @@ -582,7 +582,7 @@ public: } CutoffFunction(const DiffusionFactorType& diffusion_factor, const DiffusionTensorType& diffusion_tensor, - const RangeFieldType poincare_constant = 1.0 / (M_PIl * M_PIl), const std::string nm = static_id()) + const RangeFieldType poincare_constant = 1.0 / (M_PIl * M_PIl), const std::string nm = static_id()) : diffusion_factor_(diffusion_factor) , diffusion_tensor_(diffusion_tensor) , poincare_constant_(poincare_constant) diff --git a/dune/xt/functions/affine.hh b/dune/xt/functions/affine.hh index ebe03b9a4..e2d3cf1e3 100644 --- a/dune/xt/functions/affine.hh +++ b/dune/xt/functions/affine.hh @@ -85,7 +85,7 @@ public: } // ... create(...) explicit AffineFunction(const MatrixType& matrix, const RangeType& vector = RangeType(0), - const std::string name_in = static_id()) + const std::string name_in = static_id()) : A_(matrix) , b_(vector) , name_(name_in) diff --git a/dune/xt/functions/checkerboard.hh b/dune/xt/functions/checkerboard.hh index 83fd04946..f06d8072d 100644 --- a/dune/xt/functions/checkerboard.hh +++ b/dune/xt/functions/checkerboard.hh @@ -154,9 +154,9 @@ public: } // ... create(...) CheckerboardFunction(const Common::FieldVector<DomainFieldType, dimDomain>& lowerLeft, - const Common::FieldVector<DomainFieldType, dimDomain>& upperRight, - const Common::FieldVector<size_t, dimDomain>& numElements, const std::vector<RangeType>& values, - const std::string nm = static_id()) + const Common::FieldVector<DomainFieldType, dimDomain>& upperRight, + const Common::FieldVector<size_t, dimDomain>& numElements, const std::vector<RangeType>& values, + const std::string nm = static_id()) : lowerLeft_(new Common::FieldVector<DomainFieldType, dimDomain>(lowerLeft)) , upperRight_(new Common::FieldVector<DomainFieldType, dimDomain>(upperRight)) , numElements_(new Common::FieldVector<size_t, dimDomain>(numElements)) diff --git a/dune/xt/functions/combined.hh b/dune/xt/functions/combined.hh index dcdf7f539..346f3a5f9 100644 --- a/dune/xt/functions/combined.hh +++ b/dune/xt/functions/combined.hh @@ -39,10 +39,8 @@ enum class Combination template <class LeftType, class RightType, Combination comb> class SelectCombined { - static_assert(is_localizable_function<LeftType>::value, - "LeftType has to be a LocalizableFunction!"); - static_assert(is_localizable_function<RightType>::value, - "RightType has to be a LocalizableFunction!"); + static_assert(is_localizable_function<LeftType>::value, "LeftType has to be a LocalizableFunction!"); + static_assert(is_localizable_function<RightType>::value, "RightType has to be a LocalizableFunction!"); public: typedef typename LeftType::EntityType E; @@ -468,7 +466,8 @@ std::shared_ptr<DifferenceFunction<T1, T2>> make_difference(const T1& left, cons } template <class T1, class T2, class... Args> -std::shared_ptr<DifferenceFunction<T1, T2>> make_difference(std::shared_ptr<T1> left, std::shared_ptr<T2> right, Args&&... args) +std::shared_ptr<DifferenceFunction<T1, T2>> make_difference(std::shared_ptr<T1> left, std::shared_ptr<T2> right, + Args&&... args) { return std::make_shared<DifferenceFunction<T1, T2>>(left, right, std::forward<Args>(args)...); } @@ -492,7 +491,8 @@ std::shared_ptr<ProductFunction<T1, T2>> make_product(const T1& left, const T2& } template <class T1, class T2, class... Args> -std::shared_ptr<ProductFunction<T1, T2>> make_product(std::shared_ptr<T1> left, std::shared_ptr<T2> right, Args&&... args) +std::shared_ptr<ProductFunction<T1, T2>> make_product(std::shared_ptr<T1> left, std::shared_ptr<T2> right, + Args&&... args) { return std::make_shared<ProductFunction<T1, T2>>(left, right, std::forward<Args>(args)...); } diff --git a/dune/xt/functions/expression.hh b/dune/xt/functions/expression.hh index 8d99fac21..1a913e51a 100644 --- a/dune/xt/functions/expression.hh +++ b/dune/xt/functions/expression.hh @@ -119,7 +119,8 @@ public: * [[x[1] x[0]; x[1] x[0]] [x[1] x[0] x[1] x[0]]. */ ExpressionFunction(const std::string variable, const std::string expression, const size_t ord = 0, - const std::string nm = static_id(), const std::vector<std::string> gradient = std::vector<std::string>()) + const std::string nm = static_id(), + const std::vector<std::string> gradient = std::vector<std::string>()) : order_(ord) , name_(nm) { @@ -145,9 +146,10 @@ public: * This constructor just expands expressions and gradient_expressions from a std::vector< std::string > and * std::vector< std::vector< std::string > to ExpressionStringVectorType and GradientStringVectorType, respectively. */ - ExpressionFunction(const std::string variable, const std::vector<std::string> expressions, - const size_t ord = default_config().get<size_t>("order"), const std::string nm = static_id(), - const std::vector<std::vector<std::string>> gradient_expressions = std::vector<std::vector<std::string>>()) + ExpressionFunction( + const std::string variable, const std::vector<std::string> expressions, + const size_t ord = default_config().get<size_t>("order"), const std::string nm = static_id(), + const std::vector<std::vector<std::string>> gradient_expressions = std::vector<std::vector<std::string>>()) : function_(new MathExpressionFunctionType(variable, expressions)) , order_(ord) , name_(nm) @@ -174,8 +176,8 @@ public: * dimDomain = dimRange = dimRangeCols = 2) */ ExpressionFunction(const std::string variable, const ExpressionStringVectorType expressions, const size_t ord = 0, - const std::string nm = static_id(), - const GradientStringVectorType gradient_expressions = GradientStringVectorType()) + const std::string nm = static_id(), + const GradientStringVectorType gradient_expressions = GradientStringVectorType()) : order_(ord) , name_(nm) { diff --git a/dune/xt/functions/flattop.hh b/dune/xt/functions/flattop.hh index 06b68a7d7..d983607e1 100644 --- a/dune/xt/functions/flattop.hh +++ b/dune/xt/functions/flattop.hh @@ -92,9 +92,10 @@ public: cfg.get("name", default_cfg.get<std::string>("name"))); } // ... create(...) - FlatTopFunction(const StuffDomainType& lower_left, const StuffDomainType& upper_right, const StuffDomainType& boundary_layer, - const StuffRangeType& value = default_config().get<StuffRangeType>("value"), - const std::string name_in = default_config().get<std::string>("name")) + FlatTopFunction(const StuffDomainType& lower_left, const StuffDomainType& upper_right, + const StuffDomainType& boundary_layer, + const StuffRangeType& value = default_config().get<StuffRangeType>("value"), + const std::string name_in = default_config().get<std::string>("name")) : lower_left_(lower_left) , upper_right_(upper_right) , boundary_layer_(boundary_layer) diff --git a/dune/xt/functions/indicator.hh b/dune/xt/functions/indicator.hh index ec09db33b..4836d9e03 100644 --- a/dune/xt/functions/indicator.hh +++ b/dune/xt/functions/indicator.hh @@ -140,14 +140,16 @@ public: return Common::make_unique<ThisType>(values, cfg.get("name", def_cfg.get<std::string>("name"))); } // ... create(...) - IndicatorFunction(const std::vector<std::tuple<DomainType, DomainType, R>>& values, const std::string name_in = "indicator") + IndicatorFunction(const std::vector<std::tuple<DomainType, DomainType, R>>& values, + const std::string name_in = "indicator") : values_(values) , name_(name_in) { } - IndicatorFunction(const std::vector<std::pair<std::pair<Common::FieldVector<D, d>, Common::FieldVector<D, d>>, R>>& values, - const std::string name_in = "indicator") + IndicatorFunction( + const std::vector<std::pair<std::pair<Common::FieldVector<D, d>, Common::FieldVector<D, d>>, R>>& values, + const std::string name_in = "indicator") : values_(convert(values)) , name_(name_in) { diff --git a/dune/xt/functions/interfaces.hh b/dune/xt/functions/interfaces.hh index 0484e5927..28d4a5300 100644 --- a/dune/xt/functions/interfaces.hh +++ b/dune/xt/functions/interfaces.hh @@ -387,7 +387,8 @@ public: } template <class OtherType> - typename std::enable_if<is_localizable_function<OtherType>::value, Functions::ProductFunction<ThisType, OtherType>>::type + typename std::enable_if<is_localizable_function<OtherType>::value, + Functions::ProductFunction<ThisType, OtherType>>::type operator*(const OtherType& other) const { return Functions::ProductFunction<ThisType, OtherType>(*this, other); diff --git a/dune/xt/functions/spe10/model1.hh b/dune/xt/functions/spe10/model1.hh index 553862061..78f05bc6e 100644 --- a/dune/xt/functions/spe10/model1.hh +++ b/dune/xt/functions/spe10/model1.hh @@ -178,9 +178,9 @@ public: } // ... create(...) Model1Function(const std::string& filename, const Common::FieldVector<DomainFieldType, dimDomain>& lower_left, - const Common::FieldVector<DomainFieldType, dimDomain>& upper_right, - const RangeFieldType min = internal::model1_min_value, const RangeFieldType max = internal::model1_max_value, - const std::string nm = BaseType::static_id()) + const Common::FieldVector<DomainFieldType, dimDomain>& upper_right, + const RangeFieldType min = internal::model1_min_value, + const RangeFieldType max = internal::model1_max_value, const std::string nm = BaseType::static_id()) : BaseType(filename, lower_left, upper_right, min, max, nm, unit_matrix()) { } diff --git a/dune/xt/functions/spe10/model2.hh b/dune/xt/functions/spe10/model2.hh index 69cddec6f..b7500cc5d 100644 --- a/dune/xt/functions/spe10/model2.hh +++ b/dune/xt/functions/spe10/model2.hh @@ -40,7 +40,7 @@ class Model2Function : public GlobalFunctionInterface<EntityImp, DomainFieldImp, public: Model2Function(std::string data_filename = "perm_case2a.dat", - Common::FieldVector<double, dim_domain> upper_right = default_upper_right) + Common::FieldVector<double, dim_domain> upper_right = default_upper_right) : deltas_{{upper_right[0] / num_elements[0], upper_right[1] / num_elements[1], upper_right[2] / num_elements[2]}} , permeability_(nullptr) , permMatrix_(0.0) diff --git a/dune/xt/functions/test/functions.hh b/dune/xt/functions/test/functions.hh index e58db24fa..124b3ef94 100644 --- a/dune/xt/functions/test/functions.hh +++ b/dune/xt/functions/test/functions.hh @@ -41,8 +41,8 @@ protected: typedef typename FunctionImp::DomainType DomainType; typedef typename FunctionImp::RangeType RangeType; typedef typename FunctionImp::JacobianRangeType JacobianRangeType; - typedef Functions::LocalizableFunctionInterface<EntityType, DomainFieldType, dimDomain, RangeFieldType, dimRange, dimRangeCols> - InterfaceType; + typedef Functions::LocalizableFunctionInterface<EntityType, DomainFieldType, dimDomain, RangeFieldType, dimRange, + dimRangeCols> InterfaceType; static void static_interface_check() { -- GitLab