Commit dace98f3 authored by Andreas Nüßing's avatar Andreas Nüßing

[Cauchy] remove initial vector size

When creating the labels vector, we incorrectly initialized it with the
number of tensors and used push_back afterwards, leading to twice as many
entries. Instead, we now reserve and use push_back.
parent dfbabeed
......@@ -233,7 +233,8 @@ namespace duneuro
<< mapper.size() << " != " << tensors.size() << ")");
std::vector<TensorType> reorderedTensors(tensors.size());
std::vector<std::size_t> labels(tensors.size());
std::vector<std::size_t> labels;
for (const auto& element : Dune::elements(gv)) {
reorderedTensors[mapper.index(element)] = tensors[factory.insertionIndex(element)];
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