Skip to content
Snippets Groups Projects
Commit da61b329 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[test] drop all as_grid_function usage

parent c7e4c7a4
No related branches found
No related tags found
1 merge request!42dailywork-ftschindler
Pipeline #65029 failed
......@@ -54,7 +54,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, is_constructible)
{
ScalarRangeExpressionType expr(std::string("x[0]"));
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
}
TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, is_visualizable)
......@@ -62,7 +62,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, is_visualizable)
const auto leaf_view = grid_.leaf_view();
ScalarRangeExpressionType expr(std::string("x[0]"));
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
function.visualize(leaf_view, "test__ESV2007CutoffFunction_from_{{GRIDNAME}}__is_visualizable");
}
......@@ -70,7 +70,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, is_bindable)
{
ScalarRangeExpressionType expr(std::string("x[0]"));
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -84,7 +84,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, local_order)
const int expected_order = 0;
ScalarRangeExpressionType expr(std::string("x[0]"));
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -99,9 +99,9 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, local_evaluate)
{
ScalarRangeExpressionType expr(std::string("x[0]"));
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
auto local_diffusion = diffusion_function.template as_grid_function<ElementType>().local_function();
auto local_diffusion = diffusion_function.local_function();
double poincare_constant_ = 1.0 / (M_PIl * M_PIl);
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -131,7 +131,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, local_jacobian)
{
ScalarRangeExpressionType expr(std::string("x[0]"));
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......
......@@ -57,7 +57,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, is_constructible)
expr[dd][dd] = "x[" + Common::to_string(dd) + "]";
}
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
}
......@@ -69,7 +69,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, is_visualizable)
expr[dd][dd] = "x[" + Common::to_string(dd) + "]";
}
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
function.visualize(leaf_view, "test__ESV2007CutoffFunction_from_{{GRIDNAME}}__is_visualizable");
}
......@@ -80,7 +80,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, is_bindable)
expr[dd][dd] = "x[" + Common::to_string(dd) + "]";
}
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -97,7 +97,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, local_order)
expr[dd][dd] = "x[" + Common::to_string(dd) + "]";
}
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -115,9 +115,9 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, local_evaluate)
expr[dd][dd] = "x[" + Common::to_string(dd) + "]";
}
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
auto local_diffusion = diffusion_function.template as_grid_function<ElementType>().local_function();
auto local_diffusion = diffusion_function.local_function();
double poincare_constant_ = 1.0 / (M_PIl * M_PIl);
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -150,7 +150,7 @@ TEST_F(ESV2007CutoffFunction_from_{{GRIDNAME}}, local_jacobian)
expr[dd][dd] = "x[" + Common::to_string(dd) + "]";
}
DiffusionType diffusion_function("x", expr, 1);
FunctionType function(diffusion_function.template as_grid_function<ElementType>());
FunctionType function(diffusion_function);
auto local_f = function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......
......@@ -18,6 +18,7 @@
#include <dune/xt/grid/gridprovider/cube.hh>
#include <dune/xt/functions/ESV2007.hh>
#include <dune/xt/functions/grid-function.hh>
using namespace Dune::XT;
......@@ -114,7 +115,7 @@ TEST_F(ESV2007ExactSolutionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, glo
TEST_F(ESV2007ExactSolutionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
{
FunctionType default_function(3);
auto&& localizable_function = default_function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(default_function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -127,7 +128,7 @@ TEST_F(ESV2007ExactSolutionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, loc
{
const int expected_order = 3;
FunctionType default_function(3);
auto&& localizable_function = default_function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(default_function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -141,7 +142,7 @@ TEST_F(ESV2007ExactSolutionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, loc
TEST_F(ESV2007ExactSolutionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate)
{
FunctionType function(3);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -160,7 +161,7 @@ TEST_F(ESV2007ExactSolutionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, loc
TEST_F(ESV2007ExactSolutionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_jacobian)
{
FunctionType function(3);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......
......@@ -114,7 +114,7 @@ TEST_F(ESV2007ForceFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, global_jaco
TEST_F(ESV2007ForceFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
{
FunctionType default_function(3);
auto&& localizable_function = default_function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(default_function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -127,7 +127,7 @@ TEST_F(ESV2007ForceFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order
{
const int expected_order = 3;
FunctionType default_function(3);
auto&& localizable_function = default_function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(default_function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -141,7 +141,7 @@ TEST_F(ESV2007ForceFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order
TEST_F(ESV2007ForceFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate)
{
FunctionType function(3);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -160,7 +160,7 @@ TEST_F(ESV2007ForceFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evalu
TEST_F(ESV2007ForceFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_jacobian)
{
FunctionType function(3);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......
......@@ -109,7 +109,7 @@ TEST_F(ConstantFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, global_jacobian
TEST_F(ConstantFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
{
FunctionType function(1.);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -123,7 +123,7 @@ TEST_F(ConstantFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order)
for (auto vv : {-10., 3., 17., 41.}) {
const RangeReturnType value(vv);
FunctionType function(value);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -139,7 +139,7 @@ TEST_F(ConstantFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate)
for (auto value : {-10., 3., 17., 41.}) {
const RangeReturnType expected_value(value);
FunctionType function(expected_value);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -160,7 +160,7 @@ TEST_F(ConstantFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_jacobian)
DerivativeRangeReturnType expected_jacobian;
//expected_jacobian *= 0;
FunctionType function(value);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......
......@@ -199,7 +199,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
RangeExpressionType expr_1(std::string("x[0]*x[0]"));
FunctionType default_function("x", expr_1, 2);
auto&& localizable_function = default_function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(default_function);
auto local_f = localizable_function.local_function();
......@@ -218,7 +218,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order)
const auto leaf_view = grid_.leaf_view();
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
local_f->bind(element);
......@@ -236,7 +236,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluat
const RangeReturnType expected_value(value);
const RangeExpressionType constant_expr(Common::to_string(value));
FunctionType function("x", constant_expr, 0);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
local_f->bind(element);
......@@ -261,7 +261,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_jacobia
DerivativeRangeExpressionType constant_grad(constant_grad_single);
DerivativeRangeReturnType expected_jacobian(Common::FieldMatrix<double, rC, d>(0.));
FunctionType function("x", constant_expr, constant_grad, 0);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
local_f->bind(element);
......
......@@ -102,7 +102,7 @@ TEST_F(ParametricExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_
const RangeExpressionType expr(std::string("sin(x[0]t_)"));
FunctionType function("x", {"t_", 1}, expr, 3);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -119,7 +119,7 @@ TEST_F(ParametricExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, loc
const auto leaf_view = grid_.leaf_view();
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
local_f->bind(element);
......@@ -134,7 +134,7 @@ TEST_F(ParametricExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, loc
const RangeExpressionType expr(std::string("sin(x[0]t_)"));
FunctionType function("x", {"t_", 1}, expr, 3);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
const auto geometry = element.geometry();
......
......@@ -200,7 +200,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
RangeExpressionType expr_1(std::string("x[0]*x[0]"));
FunctionType default_function("x", expr_1, 2);
auto&& localizable_function = default_function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(default_function);
auto local_f = localizable_function.local_function();
......@@ -219,7 +219,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order)
const auto leaf_view = grid_.leaf_view();
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
local_f->bind(element);
......@@ -237,7 +237,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluat
const RangeReturnType expected_value(value);
const RangeExpressionType constant_expr(Common::to_string(value));
FunctionType function("x", constant_expr, 0);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
local_f->bind(element);
......@@ -264,7 +264,7 @@ TEST_F(ExpressionFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_jacobia
}
const DerivativeRangeReturnType expected_jacobian;
FunctionType function("x", constant_expr, constant_grad, 0);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : Dune::elements(leaf_view)) {
local_f->bind(element);
......
......@@ -120,7 +120,7 @@ TEST_F(FlattopFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
const DomainType delta(1e-6);
const double top_value = 20;
FunctionType function(left, right, delta, top_value);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -137,7 +137,7 @@ TEST_F(FlattopFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order)
const DomainType delta(1e-6);
const double top_value = 20;
FunctionType function(left, right, delta, top_value);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -155,7 +155,7 @@ TEST_F(FlattopFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate)
const DomainType delta(1e-6);
const double top_value = 20;
FunctionType func(left, right, delta, top_value);
auto&& localizable_function = func.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(func);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......
......@@ -97,7 +97,7 @@ TEST_F(GenericFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, global_jacobian)
TEST_F(GenericFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
{
LambdaType function(1.);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -110,7 +110,7 @@ TEST_F(GenericFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order)
for (auto vv : {1, 3, 5}) {
const int expected_order = vv;
LambdaType function(vv);
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -127,7 +127,7 @@ TEST_F(GenericFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate)
[](const auto& xx, const auto& param) { RangeReturnType ret(std::pow(xx[0], param.get("power").at(0))); return ret;},
"x_power_p",
Common::ParameterType("power", 1));
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......@@ -151,7 +151,7 @@ TEST_F(GenericFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_jacobian)
"jacobian.function",
{},
[](const auto& /*xx*/, const auto& /*param*/) { return DerivativeRangeReturnType();});
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : Dune::elements(leaf_view)) {
......
......@@ -186,7 +186,7 @@ TEST_F(IndicatorFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, is_bindable)
RangeType first_value(1.);
FunctionType default_function({std::make_tuple(lower_left, upper_right, first_value)});
auto&& localizable_function = default_function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(default_function);
auto local_f = localizable_function.local_function();
const auto leaf_view = grid_.leaf_view();
for (auto&& element : elements(leaf_view)) {
......@@ -205,7 +205,7 @@ TEST_F(IndicatorFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_order)
for (auto vv : {1., 2., 3., 4.}) {
RangeType value(vv);
FunctionType function({std::make_tuple(lower_left, upper_right, value)});
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : elements(leaf_view)) {
local_f->bind(element);
......@@ -229,7 +229,7 @@ TEST_F(IndicatorFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate
for (auto vv : {1., 2., 3., 4.}) {
RangeType value(vv);
FunctionType function({std::make_tuple(lower_left, upper_right, value)});
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : elements(leaf_view)) {
local_f->bind(element);
......@@ -254,7 +254,7 @@ TEST_F(IndicatorFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate
RangeType first_value(1.);
RangeType second_value(2.);
FunctionType function_multiple({std::make_tuple(lower_left, middle, first_value), std::make_tuple(middle, upper_right, second_value)});
const auto& localizable_function_mult = function_multiple.template as_grid_function<ElementType>();
auto localizable_function_mult = Functions::make_grid_function<ElementType>(function_multiple);
auto local_f_mult = localizable_function_mult.local_function();
for (auto&& element : elements(leaf_view)) {
......@@ -278,7 +278,7 @@ TEST_F(IndicatorFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_evaluate
FunctionType function_overlap({std::make_tuple(lower_left, middle, first_value),
std::make_tuple(middle, upper_right, second_value),
std::make_tuple(lower_left_ol, upper_right_ol, first_value)});
const auto& localizable_function_ol = function_overlap.template as_grid_function<ElementType>();
auto localizable_function_ol = Functions::make_grid_function<ElementType>(function_overlap);
auto local_f_ol = localizable_function_ol.local_function();
for (auto&& element : elements(leaf_view)) {
// actual
......@@ -313,7 +313,7 @@ TEST_F(IndicatorFunction_from_{{GRIDNAME}}_to_{{r}}_times_{{rC}}, local_jacobian
for (auto vv : {1., 2., 3., 4.}) {
RangeType value(vv);
FunctionType function({std::make_tuple(lower_left, upper_right, value)});
auto&& localizable_function = function.template as_grid_function<ElementType>();
auto localizable_function = Functions::make_grid_function<ElementType>(function);
auto local_f = localizable_function.local_function();
for (auto&& element : elements(leaf_view)) {
local_f->bind(element);
......
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