]> https://gitweb.dealii.org/ - dealii.git/commitdiff
change to a straight initialization
authorDenis Davydov <davydden@gmail.com>
Fri, 3 Apr 2015 06:20:57 +0000 (08:20 +0200)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 8 May 2015 16:23:52 +0000 (11:23 -0500)
include/deal.II/numerics/fe_field_function.templates.h

index 0831775511e0f07580bfef80c58ecb670926e81d..64859236c66cb097c79bc25e8822f7e833da8924 100644 (file)
@@ -87,8 +87,8 @@ namespace Functions
     FEValues<dim> fe_v(mapping, cell->get_fe(), quad,
                        update_values);
     fe_v.reinit(cell);
-    std::vector< Vector<typename VECTOR::value_type> > vvalues (1);
-    vvalues[0].reinit(values.size());
+    std::vector< Vector<typename VECTOR::value_type> >
+      vvalues (1, Vector<typename VECTOR::value_type>(values.size()));
     fe_v.get_function_values(data_vector, vvalues);
     values = vvalues[0];
   }
@@ -195,8 +195,8 @@ namespace Functions
     FEValues<dim> fe_v(mapping, cell->get_fe(), quad,
                        update_hessians);
     fe_v.reinit(cell);
-    std::vector< Vector<typename VECTOR::value_type> > vvalues (1);
-    vvalues[0].reinit(values.size());
+    std::vector< Vector<typename VECTOR::value_type> >
+      vvalues (1, Vector<typename VECTOR::value_type>(values.size()));
     fe_v.get_function_laplacians(data_vector, vvalues);
     values = vvalues[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.