From 7d67dc6ce82a19f7eb8a147478ba57d22033feed Mon Sep 17 00:00:00 2001 From: Felix Schindler <felix.schindler@wwu.de> Date: Thu, 8 Aug 2019 11:05:05 +0200 Subject: [PATCH] [bilinear-forms] add apply2() variant --- dune/gdt/local/bilinear-forms/interfaces.hh | 39 ++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/dune/gdt/local/bilinear-forms/interfaces.hh b/dune/gdt/local/bilinear-forms/interfaces.hh index 18f0b90a6..b65572225 100644 --- a/dune/gdt/local/bilinear-forms/interfaces.hh +++ b/dune/gdt/local/bilinear-forms/interfaces.hh @@ -172,6 +172,27 @@ public: DynamicMatrix<F>& result_out_out, const XT::Common::Parameter& param = {}) const = 0; + /** + * Variant which consideres the intersection only from the inside. + */ + virtual void apply2(const IntersectionType& intersection, + const LocalTestBasisType& test_basis, + const LocalAnsatzBasisType& ansatz_basis, + DynamicMatrix<F>& result, + const XT::Common::Parameter& param = {}) const + { + this->apply2(intersection, + test_basis, + ansatz_basis, + test_basis, + ansatz_basis, + result, + unused_result_, + unused_result_, + unused_result_, + param); + } + /** * This method is provided for convenience and should not be used within library code. */ @@ -197,7 +218,23 @@ public: result_out_out, param); return {result_in_in, result_in_out, result_out_in, result_out_out}; - } // ... apply(...) + } // ... apply2(...) + + /** + * This method is provided for convenience and should not be used within library code. + */ + DynamicMatrix<F> apply2(const IntersectionType& intersection, + const LocalTestBasisType& test_basis, + const LocalAnsatzBasisType& ansatz_basis, + const XT::Common::Parameter& param = {}) const + { + DynamicMatrix<F> result(test_basis.size(param), ansatz_basis.size(param), 0); + this->apply2(intersection.test_basis, ansatz_basis, param); + return result; + } + +protected: + mutable DynamicMatrix<F> unused_result_; }; // class LocalIntersectionBilinearFormInterface -- GitLab