29 template <
class Coeff,
class Gr
idFct,
class BitVector>
30 void operator()(Coeff& coeff, GridFct
const& gf, BitVector
const& bitVec)
const
33 std::map<typename Basis::MultiIndex, typename Coeff::value_type> values;
34 std::map<typename Basis::MultiIndex, std::uint8_t> counter;
36 std::vector<typename Coeff::value_type> localCoeff;
39 auto lf = localFunction(gf);
40 auto localView = basis_.localView();
41 for (
const auto& e : entitySet(basis_))
46 auto&& subTree = Dune::TypeTree::child(localView.tree(),treePath_);
47 Traversal::forEachLeafNode(subTree, [&](
auto const& node,
auto const& tp)
51 for (std::size_t i = 0; i < node.size(); ++i) {
52 auto idx = localView.index(node.localIndex(i));
66 for (std::size_t i = 0; i < node.size(); ++i) {
67 auto idx = localView.index(node.localIndex(i));
70 values[idx] += localCoeff[i];
78 assert(values.size() == counter.size());
81 auto value_it = values.begin();
82 auto count_it = counter.begin();
83 for (; value_it != values.end(); ++value_it, ++count_it) {
84 coeff.set(value_it->first, value_it->second/
double(count_it->second));
89 template <
class Coeff,
class Gr
idFct>
90 void operator()(Coeff& coeff, GridFct
const& gf)
const
101 TreePath treePath_ = {};