Skip to content
Snippets Groups Projects
Commit 1305d456 authored by René Fritze's avatar René Fritze
Browse files

applies clang-format

parent e7f6d921
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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)
......
......@@ -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))
......
......@@ -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)...);
}
......
......@@ -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)
{
......
......@@ -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)
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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())
{
}
......
......@@ -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)
......
......@@ -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()
{
......
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