Skip to content
Snippets Groups Projects
Commit ca1a7bba authored by graeser's avatar graeser
Browse files

Some hacks to make this compile with older dune versions and compilers

parent 848ce8df
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,17 @@ namespace Dune::Fufem::Forms::Impl {
if constexpr (sizeof...(T)==0)
return container;
else
#if DUNE_VERSION_GT(DUNE_TYPETREE, 2, 9)
return accessByTreePath(container[path.front()], pop_front(path));
#else
{
auto head = path[Dune::Indices::_0];
auto tailPath = Dune::unpackIntegerSequence([&](auto... i){
return Dune::TypeTree::treePath(path[Dune::index_constant<i+1>{}]...);
}, std::make_index_sequence<sizeof...(T)-1>());
return accessByTreePath(container[head], tailPath);
}
#endif
}
......
......@@ -139,7 +139,7 @@ namespace Dune::Fufem::Forms {
else if constexpr(Node::isPower and Node::ChildType::isLeaf)
return [&](const auto& i) {
using Field = typename LeafNode::FiniteElement::Traits::LocalBasisType::Traits::RangeFieldType;
constexpr auto components = Node::degree();
static constexpr auto components = Node::degree();
auto componentIndex = i / leafNode_->size();
auto shapeFunctionIndex = i % leafNode_->size();
auto result = Dune::FieldVector<Field,components>(0);
......@@ -230,8 +230,8 @@ namespace Dune::Fufem::Forms {
return Dune::MetaType<LeafFEJacobian>();
else if constexpr(Node::isPower and Node::ChildType::isLeaf)
{
constexpr auto components = Node::degree();
constexpr auto dimension = LeafNode::FiniteElement::Traits::LocalBasisType::Traits::dimDomain;
static constexpr auto components = Node::degree();
static constexpr auto dimension = LeafNode::FiniteElement::Traits::LocalBasisType::Traits::dimDomain;
return Dune::MetaType<Dune::FieldMatrix<LeafFERangeField,components,dimension>>();
}
}
......@@ -439,7 +439,7 @@ namespace Dune::Fufem::Forms {
if constexpr(Node::isLeaf)
return [&](const auto& i) {
using Field = typename LeafNode::FiniteElement::Traits::LocalBasisType::Traits::RangeFieldType;
constexpr auto dimension = LeafNode::FiniteElement::Traits::LocalBasisType::Traits::dimDomain;
static constexpr auto dimension = LeafNode::FiniteElement::Traits::LocalBasisType::Traits::dimDomain;
auto div = Field{0};
for(std::size_t j=0; j<dimension; ++j)
div += globalJacobians[i][j][j];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment