Commit 15263b7e authored by Felix Gruber's avatar Felix Gruber

[cleanup] replace raw for-loop with copy_n

parent 7df3739e
Pipeline #14834 passed with stage
in 27 minutes and 47 seconds
......@@ -5,6 +5,7 @@
#include <cmath>
#include <algorithm>
#include <array>
#include <memory>
#include <tuple>
......@@ -260,22 +261,14 @@ int main()
const size_t nFace = std::get<1>(*solutionSpaces).size();
const size_t nInner = std::get<0>(*solutionSpaces).size();
VectorType u(nInner);
VectorType theta(nFace);
// We extract the solution vector u
for (size_t i=0; i<nInner; i++)
u[i] = x[i];
VectorType u(nInner);
std::copy_n(x.begin(), nInner, u.begin());
// We extract the solution vector theta of the faces
for (size_t i=0; i<nFace; i++)
theta[i] = x[nInner+i];
VectorType theta(nFace);
std::copy_n(x.begin() + nInner, nFace, theta.begin());
auto innerSpace = std::get<0>(*solutionSpaces);
auto feBasisTrace = std::get<1>(*solutionSpaces);
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