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

[functions] this adds type assertions to help in solving #87

parent 1cd4eda1
No related branches found
No related tags found
No related merge requests found
...@@ -124,6 +124,10 @@ public: ...@@ -124,6 +124,10 @@ public:
using typename BaseType::LocalfunctionType; using typename BaseType::LocalfunctionType;
static_assert(std::is_same<typename LocalfunctionType::RangeType, RangeType>::value, "RangeType mismatch");
static_assert(std::is_same<typename LocalfunctionType::DomainType, DomainType>::value, "DomainType mismatch");
static_assert(std::is_same<Dune::FieldVector<DomainFieldImp, domainDim>, DomainType>::value, "RangeType mismatch");
static const bool available = true; static const bool available = true;
static std::string static_id() static std::string static_id()
......
...@@ -602,6 +602,10 @@ public: ...@@ -602,6 +602,10 @@ public:
typedef typename BaseType::JacobianRangeType JacobianRangeType; typedef typename BaseType::JacobianRangeType JacobianRangeType;
#endif #endif
static_assert(std::is_same<typename LocalfunctionType::RangeType, RangeType>::value, "RangeType mismatch");
static_assert(std::is_same<typename LocalfunctionType::DomainType, DomainType>::value, "DomainType mismatch");
static_assert(std::is_same<Dune::FieldVector<DomainFieldImp, domainDim>, DomainType>::value, "DomainType mismatch");
virtual ~GlobalFunctionInterface() virtual ~GlobalFunctionInterface()
{ {
} }
......
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