Dune Core Modules (2.11.0)

datacollectorinterface.impl.hh
1#pragma once
2
3#include <dune/geometry/referenceelements.hh>
4
5namespace Dune::Vtk {
6
7template <class GV, class D, class P>
8 template <class T, class VtkFunction>
9std::vector<T> DataCollectorInterface<GV,D,P>
10 ::cellDataImpl (VtkFunction const& fct) const
11{
12 std::vector<T> data;
13 data.reserve(this->numCells() * fct.numComponents());
14
15 auto localFct = localFunction(fct);
16 for (auto const& e : elements(gridView_, partition)) {
17 localFct.bind(e);
18 auto refElem = referenceElement<T,dim>(e.type());
19 for (int comp = 0; comp < fct.numComponents(); ++comp)
20 data.emplace_back(localFct.evaluate(comp, refElem.position(0,0)));
21 localFct.unbind();
22 }
23 return data;
24}
25
26} // end namespace Dune::Vtk
auto elements(const SubDomainGridView< HostGridView > &subDomainGridView)
ADL findable access to element range for a SubDomainGridView.
Definition: subdomain.hh:487
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Feb 14, 23:39, 2026)