From d478968be5fc11b6bbba6d1190c278c456710840 Mon Sep 17 00:00:00 2001 From: Felix Schindler <felix.schindler@wwu.de> Date: Sat, 14 Mar 2020 21:45:59 +0100 Subject: [PATCH] local_binary_to_unary_element_integrand -> with_ansatz --- dune/gdt/test/stationary-eocstudies/diffusion-ipdg.hh | 3 +-- dune/gdt/test/stokes/stokes-taylorhood.hh | 8 ++++---- examples/adaptive_elliptic_swipdg.cc | 3 +-- examples/stationary-heat-equation.cc | 3 +-- python/dune/gdt/gamm-2019-talk-on-conservative-rb.cc | 3 +-- python/dune/gdt/usercode.hh | 3 +-- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/dune/gdt/test/stationary-eocstudies/diffusion-ipdg.hh b/dune/gdt/test/stationary-eocstudies/diffusion-ipdg.hh index 7730fa805..7c77e8b90 100644 --- a/dune/gdt/test/stationary-eocstudies/diffusion-ipdg.hh +++ b/dune/gdt/test/stationary-eocstudies/diffusion-ipdg.hh @@ -289,8 +289,7 @@ protected: XT::Grid::ApplyOn::CustomBoundaryIntersections<GV>(this->boundary_info(), new XT::Grid::DirichletBoundary())); // define rhs functional auto rhs_func = make_vector_functional<V>(space); - rhs_func.append(LocalElementIntegralFunctional<E>( - local_binary_to_unary_element_integrand(LocalProductIntegrand<E>(), this->force()))); + rhs_func.append(LocalElementIntegralFunctional<E>(LocalProductIntegrand<E>().with_ansatz(this->force()))); // ... add Dirichlet here // (if we add something here, the oswald interpolation in compute() needs to be adapted accordingly!) // ... add Neumann here diff --git a/dune/gdt/test/stokes/stokes-taylorhood.hh b/dune/gdt/test/stokes/stokes-taylorhood.hh index e67b0d2b7..230917d39 100644 --- a/dune/gdt/test/stokes/stokes-taylorhood.hh +++ b/dune/gdt/test/stokes/stokes-taylorhood.hh @@ -234,13 +234,13 @@ public: // calculate rhs f as \int ff v and the integrated pressure space basis \int q_i Vector f_vector(m), p_basis_integrated_vector(n); auto f_functional = make_vector_functional(velocity_space, f_vector); - f_functional.append(LocalElementIntegralFunctional<E, d>( - local_binary_to_unary_element_integrand(LocalProductIntegrand<E, d>(), problem_.rhs_f()))); + f_functional.append( + LocalElementIntegralFunctional<E, d>(LocalProductIntegrand<E, d>().with_ansatz(problem_.rhs_f()))); A_operator.append(f_functional); auto p_basis_integrated_functional = make_vector_functional(pressure_space, p_basis_integrated_vector); XT::Functions::ConstantGridFunction<E> one_function(1); - p_basis_integrated_functional.append(LocalElementIntegralFunctional<E, 1>( - local_binary_to_unary_element_integrand(LocalProductIntegrand<E, 1>(), one_function))); + p_basis_integrated_functional.append( + LocalElementIntegralFunctional<E, 1>(LocalProductIntegrand<E, 1>().with_ansatz(one_function))); B_operator.append(p_basis_integrated_functional); // Dirichlet constrainst for u DirichletConstraints<I, VelocitySpace> dirichlet_constraints(problem_.boundary_info(), velocity_space); diff --git a/examples/adaptive_elliptic_swipdg.cc b/examples/adaptive_elliptic_swipdg.cc index 9655a2969..c4531320a 100644 --- a/examples/adaptive_elliptic_swipdg.cc +++ b/examples/adaptive_elliptic_swipdg.cc @@ -231,8 +231,7 @@ int main(int argc, char* argv[]) {}, XT::Grid::ApplyOn::CustomBoundaryIntersections<GV>(boundary_info, new XT::Grid::DirichletBoundary())); auto rhs_func = make_vector_functional<V>(dg_space); - rhs_func.append( - LocalElementIntegralFunctional<E>(local_binary_to_unary_element_integrand(LocalProductIntegrand<E>(), f))); + rhs_func.append(LocalElementIntegralFunctional<E>(LocalProductIntegrand<E>().with_ansatz(f))); // ... add Dirichlet here // (if we add something here, the oswald interpolation needs to be adapted accordingly!) // ... add Neumann here diff --git a/examples/stationary-heat-equation.cc b/examples/stationary-heat-equation.cc index ec981378b..2b81ea49d 100644 --- a/examples/stationary-heat-equation.cc +++ b/examples/stationary-heat-equation.cc @@ -97,8 +97,7 @@ int main(int argc, char* argv[]) LocalEllipticIntegrand<E>(lambda.as_grid_function<E>(), kappa.as_grid_function<E>()))); auto rhs_func = make_vector_functional<V>(space); - rhs_func.append(LocalElementIntegralFunctional<E>( - local_binary_to_unary_element_integrand(LocalProductIntegrand<E>(), force.as_grid_function<E>()))); + rhs_func.append(LocalElementIntegralFunctional<E>(LocalProductIntegrand<E>().with_ansatz(force))); auto dirichlet_constraints = make_dirichlet_constraints(space, boundary_info); diff --git a/python/dune/gdt/gamm-2019-talk-on-conservative-rb.cc b/python/dune/gdt/gamm-2019-talk-on-conservative-rb.cc index 53b388713..014090ed1 100644 --- a/python/dune/gdt/gamm-2019-talk-on-conservative-rb.cc +++ b/python/dune/gdt/gamm-2019-talk-on-conservative-rb.cc @@ -100,8 +100,7 @@ std::unique_ptr<V> assemble_L2_vector(const DG& space, const XT::Functions::GridFunctionInterface<E>& force, const bool parallel) { auto func = make_vector_functional<V>(space); - func.append(LocalElementIntegralFunctional<E>( - local_binary_to_unary_element_integrand(LocalElementProductIntegrand<E>(), force))); + func.append(LocalElementIntegralFunctional<E>(LocalElementProductIntegrand<E>().with_ansatz(force))); func.assemble(parallel); return std::move(std::make_unique<V>(std::move(func.vector()))); } // ... assemble_L2_vector(...) diff --git a/python/dune/gdt/usercode.hh b/python/dune/gdt/usercode.hh index 863003bbf..ae71254c0 100644 --- a/python/dune/gdt/usercode.hh +++ b/python/dune/gdt/usercode.hh @@ -531,8 +531,7 @@ std::unique_ptr<V> assemble_local_rhs(const XT::Functions::GridFunctionInterface auto subdomain_space = make_subdomain_space(subdomain_grid_view, space_type); // create functional auto subdomain_functional = make_vector_functional<V>(*subdomain_space); - const LocalElementIntegralFunctional<E> element_functional( - local_binary_to_unary_element_integrand(LocalProductIntegrand<E>(), force)); + const LocalElementIntegralFunctional<E> element_functional(LocalProductIntegrand<E>().with_ansatz(force)); subdomain_functional.append(element_functional); subdomain_functional.assemble(); subdomain_vector = std::make_unique<V>(subdomain_functional.vector()); -- GitLab