]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor fixes to silence a bunch of warnings
authorMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 9 Nov 2012 14:42:12 +0000 (14:42 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 9 Nov 2012 14:42:12 +0000 (14:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@27488 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/tensor_base.h
deal.II/source/base/data_out_base.cc
deal.II/source/fe/fe_system.cc

index f6e1c7d6edc033ca7017f7d7032189c298d39245..0627a6dfb2a295fa11212969d621eca4b6626653 100644 (file)
@@ -607,7 +607,7 @@ class Tensor<1,dim,Number>
                                       * constructor to disallow the
                                       * creation of such an object.
                                       */
-    Number values[(dim!=0) ? (dim) : 1];
+    Number values[(dim!=0) ? (dim) : (dim+1)];
 
                                      /**
                                       * Help function for unroll. If
@@ -990,6 +990,7 @@ Tensor<1,dim,Number>::operator = (const Tensor<1,dim,Number> &p)
       values[1] = p.values[1];
       break;
     case 3:
+
       values[0] = p.values[0];
       values[1] = p.values[1];
       values[2] = p.values[2];
index 9d4a1afe05f20a010a5198e5497ecd7f60bccc08..ecb23fa36fa092c29005e706f63bd2f6e3fad4cd 100644 (file)
@@ -1084,7 +1084,7 @@ namespace
     unsigned int d2,
     unsigned int d3)
   {
-    int nodes[8];
+    int nodes[1<<dim];
     nodes[GeometryInfo<dim>::dx_to_deal[0]] = start;
     nodes[GeometryInfo<dim>::dx_to_deal[1]] = start+d1;
     if (dim>=2)
@@ -1306,7 +1306,7 @@ namespace
     unsigned int d2,
     unsigned int d3)
   {
-    int nodes[8];
+    int nodes[1<<dim];
     nodes[GeometryInfo<dim>::ucd_to_deal[0]] = start;
     nodes[GeometryInfo<dim>::ucd_to_deal[1]] = start+d1;
     if (dim>=2)
@@ -5898,7 +5898,6 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
     (void)comm;
     AssertThrow(false, ExcMessage ("HDF5 support is disabled."));
 #else
-    int             world_size;
     hid_t           h5_file_id, plist_id;
     hid_t           node_dataspace, node_dataset, node_file_dataspace, node_memory_dataspace;
     hid_t           cell_dataspace, cell_dataset, cell_file_dataspace, cell_memory_dataspace;
@@ -5911,6 +5910,7 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
     // If HDF5 is not parallel and we're using multiple processes, abort
 #ifndef H5_HAVE_PARALLEL
 #ifdef DEAL_II_COMPILER_SUPPORTS_MPI
+    int world_size;
     MPI_Comm_size(comm, &world_size);
     AssertThrow (world_size <= 1,
                  ExcMessage ("Serial HDF5 output on multiple processes is not yet supported."));
index faf1f3dd089884ec464641b403e80ee735b07b30..33d6b8cd9c48bfa20fb6267129d4ee2a392624e8 100644 (file)
@@ -36,7 +36,7 @@ namespace
     return std::count_if(vec.begin(), vec.end(), IsNonZero);
   }
 
-};
+}
 /* ----------------------- FESystem::InternalData ------------------- */
 
 

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.