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

lagrange data-collector for vtu files with entities of different dimension now...

lagrange data-collector for vtu files with entities of different dimension now ignores the lower dimensional entities
parent 6749a6f4
Branches
Tags
No related merge requests found
......@@ -83,11 +83,14 @@ namespace Dune
// mapping of node index to element-vertex index
std::vector<std::int64_t> elementVertices(nodes_.size(), -1);
parametrization_.resize(types.size());
parametrization_.reserve(types.size());
std::int64_t vertexIndex = 0;
for (std::size_t i = 0; i < types.size(); ++i) {
auto type = Vtk::to_geometry(types[i]);
if (type.dim() != Grid::dimension)
continue;
Vtk::CellType cellType{type};
auto refElem = referenceElement<double,Grid::dimension>(type);
......@@ -117,16 +120,18 @@ namespace Dune
}
// fill vector of element parametrizations
parametrization_[i].type = type;
parametrization_[i].nodes.resize(nNodes);
parametrization_.push_back(ElementParametrization{type});
auto& param = parametrization_.back();
param.nodes.resize(nNodes);
for (int j = 0; j < nNodes; ++j)
parametrization_[i].nodes[j] = connectivity.at(shift + j);
parametrization_[i].corners = element;
param.nodes[j] = connectivity.at(shift + j);
param.corners = element;
// try to create element with parametrization
if constexpr (Std::is_detected_v<HasParametrizedElements, GridFactory<Grid>>) {
try {
factory().insertElement(type, element, localParametrization(i));
factory().insertElement(type, element, localParametrization(parametrization_.size()-1));
} catch (Dune::GridError const& /* notImplemented */) {
factory().insertElement(type, element);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment