]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix DataPostprocessorTensor: Don't add suffixes to the lone tensor variable.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Aug 2020 01:29:28 +0000 (19:29 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Aug 2020 14:54:57 +0000 (08:54 -0600)
source/numerics/data_postprocessor.cc

index 791ef72ec3e959db7d5045d8df144bb325696108..565d8d649f293713c5678f61aa4a45465d7ca4eb 100644 (file)
@@ -148,15 +148,7 @@ template <int dim>
 std::vector<std::string>
 DataPostprocessorTensor<dim>::get_names() const
 {
-  static_assert(dim <= 3,
-                "The following variable needs to be expanded for dim>3");
-  static const char suffixes[] = {'x', 'y', 'z'};
-
-  std::vector<std::string> names;
-  for (unsigned int d = 0; d < dim; ++d)
-    for (unsigned int e = 0; e < dim; ++e)
-      names.push_back(name + '_' + suffixes[d] + suffixes[e]);
-  return names;
+  return std::vector<std::string>(dim * dim, name);
 }
 
 

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.