Skip to content
Snippets Groups Projects
Commit 5b370a25 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Add flag to deactivate nodecache

parent db94c467
No related tags found
No related merge requests found
......@@ -23,8 +23,12 @@ namespace AMDiS
/// Tree of local finite elements / local shape function sets
using Tree = typename Super::Tree;
#ifndef AMDIS_NO_NODECACHE
/// Cached basis-tree
using TreeCache = NodeCache_t<Tree>;
#else
using TreeCache = Tree;
#endif
public:
/// \brief Construct local view for a given global finite element basis
......@@ -35,10 +39,14 @@ namespace AMDiS
/// \brief Cached version of the local ansatz tree
TreeCache const& treeCache () const
{
#ifndef AMDIS_NO_NODECACHE
if (!treeCache_)
treeCache_.emplace(makeNodeCache(Super::tree_));
return *treeCache_;
#else
return Super::tree_;
#endif
}
/// \brief Return this local-view
......@@ -48,7 +56,9 @@ namespace AMDiS
}
protected:
#ifndef AMDIS_NO_NODECACHE
mutable OptionalNoCopy<TreeCache> treeCache_ = std::nullopt;
#endif
};
} // end namespace AMDiS
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