]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make code 4d-safe.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Nov 1999 09:07:44 +0000 (09:07 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 22 Nov 1999 09:07:44 +0000 (09:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@1922 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/data_out_base.cc

index 13f8058e2a2a0c9f612cc83248527c2b8582d968..fb26d35bc806ab73c86b5a4fa102ed5f09302ebf 100644 (file)
@@ -1162,13 +1162,8 @@ void DataOutBase::write_gmv (const vector<Patch<dim> > &patches,
          else
                                             // d>dim. write zeros instead
            {
-             const unsigned int n_points = (dim==1 ?
-                                            n_subdivisions+1 :
-                                            (dim==2 ?
-                                             (n_subdivisions+1) * (n_subdivisions+1) :
-                                             (dim == 3 ?
-                                              (n_subdivisions+1) * (n_subdivisions+1) * (n_subdivisions+1) :
-                                              0)));
+             const unsigned int n_points
+               = static_cast<unsigned int>(pow (n_subdivisions+1, dim));
              for (unsigned int i=0; i<n_points; ++i)
                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.