Skip to content
Snippets Groups Projects
Commit 9a67ab51 authored by Tom Fischer's avatar Tom Fischer
Browse files

[NL] Apply all Dirichlet BCs at once.

parent 85ca39c2
No related branches found
No related tags found
No related merge requests found
......@@ -359,10 +359,14 @@ public:
_ode.getKnownSolutions(_time_disc.getCurrentTime());
if (known_solutions) {
using IndexType = typename MathLib::MatrixVectorTraits<Matrix>::Index;
std::vector<IndexType> ids;
std::vector<double> values;
for (auto const& bc : *known_solutions) {
// TODO maybe it would be faster to apply all at once
MathLib::applyKnownSolution(A, rhs, x, bc.ids, bc.values);
std::copy(bc.ids.cbegin(), bc.ids.cend(), std::back_inserter(ids));
std::copy(bc.values.cbegin(), bc.values.cend(), std::back_inserter(values));
}
MathLib::applyKnownSolution(A, rhs, x, ids, values);
}
}
......
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