]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor simplification of some code. 15568/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 1 Jul 2023 21:11:19 +0000 (15:11 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 3 Jul 2023 01:51:53 +0000 (19:51 -0600)
source/numerics/solution_transfer.cc

index 74bffa4ec32da60a8ed3c07ea57ab88a3f0128cf..3be488fe943be79eda6dd39aa49e0faf951572be 100644 (file)
@@ -601,11 +601,11 @@ SolutionTransfer<dim, VectorType, spacedim>::interpolate(const VectorType &in,
   Assert(out.size() == dof_handler->n_dofs(),
          ExcDimensionMismatch(out.size(), dof_handler->n_dofs()));
 
-  std::vector<VectorType> all_in(1);
-  all_in[0] = in;
-  std::vector<VectorType> all_out(1);
-  all_out[0] = out;
+  std::vector<VectorType> all_in  = {in};
+  std::vector<VectorType> all_out = {out};
+
   interpolate(all_in, all_out);
+
   out = all_out[0];
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.