]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make compile without C++11
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 2 Mar 2015 12:55:25 +0000 (13:55 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 2 Mar 2015 12:56:26 +0000 (13:56 +0100)
examples/step-33/step-33.cc

index c2854effd7521cc18c9cbf2560abc1de3a7e79de..f153912aa0e92b674ae7666e83d9160e3bd39950 100644 (file)
@@ -28,6 +28,7 @@
 #include <deal.II/base/function_parser.h>
 #include <deal.II/base/utilities.h>
 #include <deal.II/base/conditional_ostream.h>
+#include <deal.II/base/std_cxx11/array.h>
 
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/compressed_sparsity_pattern.h>
@@ -230,7 +231,7 @@ namespace Step33
     template <typename InputVector, typename Number>
     static
     void compute_flux_matrix (const InputVector &W,
-                              std::array <std::array <Number, dim>, EulerEquations<dim>::n_components > &flux)
+                              std_cxx11::array <std_cxx11::array <Number, dim>, EulerEquations<dim>::n_components > &flux)
     {
       // First compute the pressure that appears in the flux matrix, and then
       // compute the first <code>dim</code> columns of the matrix that
@@ -272,9 +273,9 @@ namespace Step33
                                 const InputVector                  &Wplus,
                                 const InputVector                  &Wminus,
                                 const double                        alpha,
-                                std::array < Number, n_components> &normal_flux)
+                                std_cxx11::array < Number, n_components> &normal_flux)
     {
-      std::array <std::array <Number, dim>, EulerEquations<dim>::n_components > iflux, oflux;
+      std_cxx11::array <std_cxx11::array <Number, dim>, EulerEquations<dim>::n_components > iflux, oflux;
 
       compute_flux_matrix (Wplus, iflux);
       compute_flux_matrix (Wminus, oflux);
@@ -302,7 +303,7 @@ namespace Step33
     template <typename InputVector, typename Number>
     static
     void compute_forcing_vector (const InputVector &W,
-                                 std::array < Number, n_components> &forcing)
+                                 std_cxx11::array < Number, n_components> &forcing)
     {
       const double gravity = -1.0;
 
@@ -1770,16 +1771,16 @@ namespace Step33
     // later easily be computed from it:
 
     std::vector <
-    std::array <std::array <Sacado::Fad::DFad<double>, dim>, EulerEquations<dim>::n_components >
+    std_cxx11::array <std_cxx11::array <Sacado::Fad::DFad<double>, dim>, EulerEquations<dim>::n_components >
     > flux(n_q_points);
 
     std::vector <
-    std::array <std::array <double, dim>, EulerEquations<dim>::n_components >
+    std_cxx11::array <std_cxx11::array <double, dim>, EulerEquations<dim>::n_components >
     > flux_old(n_q_points);
 
-    std::vector < std::array< Sacado::Fad::DFad<double>, EulerEquations<dim>::n_components> > forcing(n_q_points);
+    std::vector < std_cxx11::array< Sacado::Fad::DFad<double>, EulerEquations<dim>::n_components> > forcing(n_q_points);
 
-    std::vector < std::array< double, EulerEquations<dim>::n_components> > forcing_old(n_q_points);
+    std::vector < std_cxx11::array< double, EulerEquations<dim>::n_components> > forcing_old(n_q_points);
 
     for (unsigned int q=0; q<n_q_points; ++q)
       {
@@ -2020,8 +2021,8 @@ namespace Step33
     // that does so, we also need to determine the Lax-Friedrich's stability
     // parameter:
 
-    std::vector< std::array < Sacado::Fad::DFad<double>, EulerEquations<dim>::n_components> >  normal_fluxes(n_q_points);
-    std::vector< std::array < double, EulerEquations<dim>::n_components> >  normal_fluxes_old(n_q_points);
+    std::vector< std_cxx11::array < Sacado::Fad::DFad<double>, EulerEquations<dim>::n_components> >  normal_fluxes(n_q_points);
+    std::vector< std_cxx11::array < double, EulerEquations<dim>::n_components> >  normal_fluxes_old(n_q_points);
 
     double alpha;
 

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.