Skip to content
Snippets Groups Projects
Commit 64869d7a authored by maxka's avatar maxka
Browse files

Add scaling for custom MultiTypeBlockMatrix type.

parent 611784cb
Branches
No related tags found
1 merge request!18Feature/energynorm matrix provider
Pipeline #
...@@ -143,6 +143,8 @@ struct NestableMultiTypeBlockVector : public Dune::MultiTypeBlockVector<Args...> ...@@ -143,6 +143,8 @@ struct NestableMultiTypeBlockVector : public Dune::MultiTypeBlockVector<Args...>
template<class... Args> template<class... Args>
struct NestableMultiTypeBlockMatrix : public Dune::MultiTypeBlockMatrix<Args...> { struct NestableMultiTypeBlockMatrix : public Dune::MultiTypeBlockMatrix<Args...> {
constexpr static size_t blocklevel = 1; // fake value needed for BCRSMatrix nesting constexpr static size_t blocklevel = 1; // fake value needed for BCRSMatrix nesting
template<class K, typename = std::enable_if_t<Dune::IsNumber<K>::value>>
void operator*=(K v) { Dune::Hybrid::forEach(*this, [v](auto& b) { b *= v; }); } // allow multiplication by scalar
}; };
// inject field traits for custom multi type block vector to be used by the norms // inject field traits for custom multi type block vector to be used by the norms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment