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

[integrands] fix combined integrand

parent 0085a02e
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,11 @@ namespace GDT { ...@@ -52,6 +52,11 @@ namespace GDT {
// virtual std::unique_ptr<ThisType> copy() const = 0; // virtual std::unique_ptr<ThisType> copy() const = 0;
// protected:
// virtual void post_bind(const IntersectionType& intrsctn) = 0;
// public:
// /** // /**
// * Returns the polynomial order of the integrand, given the basis. // * Returns the polynomial order of the integrand, given the basis.
// * // *
...@@ -131,6 +136,10 @@ namespace GDT { ...@@ -131,6 +136,10 @@ namespace GDT {
// virtual std::unique_ptr<ThisType> copy() const = 0; // virtual std::unique_ptr<ThisType> copy() const = 0;
// protected:
// virtual void post_bind(const IntersectionType& intrsctn) = 0;
// public:
// /** // /**
// * Returns the polynomial order of the integrand, given the bases. // * Returns the polynomial order of the integrand, given the bases.
// * // *
...@@ -207,6 +216,10 @@ namespace GDT { ...@@ -207,6 +216,10 @@ namespace GDT {
// virtual std::unique_ptr<ThisType> copy() const = 0; // virtual std::unique_ptr<ThisType> copy() const = 0;
// protected:
// virtual void post_bind(const IntersectionType& intrsctn) = 0;
// public:
// /** // /**
// * Returns the polynomial order of the integrand, given the bases. // * Returns the polynomial order of the integrand, given the bases.
// * // *
...@@ -254,17 +267,20 @@ class LocalQuaternaryIntersectionIntegrandSum ...@@ -254,17 +267,20 @@ class LocalQuaternaryIntersectionIntegrandSum
public: public:
using typename BaseType::DomainType; using typename BaseType::DomainType;
using typename BaseType::IntersectionType;
using typename BaseType::LocalAnsatzBasisType; using typename BaseType::LocalAnsatzBasisType;
using typename BaseType::LocalTestBasisType; using typename BaseType::LocalTestBasisType;
LocalQuaternaryIntersectionIntegrandSum(const BaseType& left, const BaseType& right) LocalQuaternaryIntersectionIntegrandSum(const BaseType& left, const BaseType& right)
: left_(left.copy().release()) : BaseType(left.parameter_type() + right.parameter_type())
, left_(left.copy().release())
, right_(right.copy().release()) , right_(right.copy().release())
{} {}
LocalQuaternaryIntersectionIntegrandSum(const ThisType& other) LocalQuaternaryIntersectionIntegrandSum(const ThisType& other)
: left_(other.left_) : BaseType(other)
, right_(other.right_) , left_(other.left_.access().copy().release())
, right_(other.right_.access().copy().release())
{} {}
LocalQuaternaryIntersectionIntegrandSum(ThisType&& source) = default; LocalQuaternaryIntersectionIntegrandSum(ThisType&& source) = default;
...@@ -274,6 +290,14 @@ public: ...@@ -274,6 +290,14 @@ public:
return std::make_unique<ThisType>(*this); return std::make_unique<ThisType>(*this);
} }
protected:
void post_bind(const IntersectionType& intrsctn) override final
{
left_.access().bind(intrsctn);
right_.access().bind(intrsctn);
}
public:
int order(const LocalTestBasisType& test_basis_inside, int order(const LocalTestBasisType& test_basis_inside,
const LocalAnsatzBasisType& ansatz_basis_inside, const LocalAnsatzBasisType& ansatz_basis_inside,
const LocalTestBasisType& test_basis_outside, const LocalTestBasisType& test_basis_outside,
...@@ -340,8 +364,8 @@ public: ...@@ -340,8 +364,8 @@ public:
} // ... evaluate(...) } // ... evaluate(...)
private: private:
XT::Common::ConstStorageProvider<BaseType> left_; XT::Common::StorageProvider<BaseType> left_;
XT::Common::ConstStorageProvider<BaseType> right_; XT::Common::StorageProvider<BaseType> right_;
mutable DynamicMatrix<F> result_in_in_; mutable DynamicMatrix<F> result_in_in_;
mutable DynamicMatrix<F> result_in_out_; mutable DynamicMatrix<F> result_in_out_;
mutable DynamicMatrix<F> result_out_in_; mutable DynamicMatrix<F> result_out_in_;
......
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