Commit a7a4301c authored by Praetorius, Simon's avatar Praetorius, Simon

simplify TreeContainer in DataTransfer

parent c1f9ea46
Pipeline #4516 failed with stage
in 14 seconds
......@@ -94,7 +94,7 @@ namespace AMDiS
template <class Node>
using NodeElementData = typename NodeDataTransfer<Node, Container, Basis>::NodeElementData;
using ElementData = TYPEOF(makeTreeContainer<NodeElementData>(std::declval<const Tree&>()));
using ElementData = TreeContainer<NodeElementData,Tree,true>;
using Interface = DataTransferInterface<Container>;
......@@ -138,7 +138,7 @@ namespace AMDiS
/// Data transfer on a single basis node
template <class Node>
using NDT = NodeDataTransfer<Node, Container, Basis>;
using NodeDataTransferContainer = TYPEOF(makeTreeContainer<NDT>(std::declval<const Tree&>()));
using NodeDataTransferContainer = TreeContainer<NDT,Tree,true>;
NodeDataTransferContainer nodeDataTransfer_;
};
......
......@@ -46,7 +46,7 @@ template <class C, class B>
DataTransfer<C,B>::DataTransfer(std::shared_ptr<B const> basis)
: basis_(std::move(basis))
, mapper_(basis_->gridView().grid(), Dune::mcmgElementLayout())
, nodeDataTransfer_(makeTreeContainer<NDT>(basis_->localView().tree()))
, nodeDataTransfer_()
{}
......@@ -66,7 +66,7 @@ preAdapt(C const& coeff, bool mightCoarsen)
persistentContainer_.clear(); // Redundant if postAdapt was correctly called last cycle
for (const auto& e : elements(gv))
{
auto it = persistentContainer_.emplace(idSet.id(e), makeTreeContainer<NodeElementData>(lv.tree()));
auto it = persistentContainer_.emplace(idSet.id(e), makeTreeContainer<NodeElementData,true>(lv.tree()));
lv.bind(e);
auto& treeContainer = it.first->second;
......@@ -88,7 +88,7 @@ preAdapt(C const& coeff, bool mightCoarsen)
while (father.mightVanish() && father.hasFather())
{
father = father.father();
auto it = persistentContainer_.emplace(idSet.id(father), makeTreeContainer<NodeElementData>(lv.tree()));
auto it = persistentContainer_.emplace(idSet.id(father), makeTreeContainer<NodeElementData,true>(lv.tree()));
if (!it.second)
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment