]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Unify exceptions throughout the DataOut* classes.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Mar 2015 01:29:35 +0000 (20:29 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Mar 2015 01:29:35 +0000 (20:29 -0500)
include/deal.II/numerics/data_out.h
include/deal.II/numerics/data_out_dof_data.h
include/deal.II/numerics/data_out_faces.h
include/deal.II/numerics/data_out_rotation.h
include/deal.II/numerics/data_out_stack.h
source/numerics/data_out.cc
source/numerics/data_out_dof_data.cc
source/numerics/data_out_faces.cc
source/numerics/data_out_rotation.cc
source/numerics/data_out_stack.cc

index 9f6512ee17693856ed5a2972c22686477ec518bc..12cf2850c5b679ae897ac41574c0a0f06ad224b7 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2014 by the deal.II authors
+// Copyright (C) 1999 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -267,15 +267,6 @@ public:
    */
   virtual cell_iterator next_cell (const cell_iterator &cell);
 
-  /**
-   * Exception
-   */
-  DeclException1 (ExcInvalidNumberOfSubdivisions,
-                  int,
-                  << "The number of subdivisions per patch, " << arg1
-                  << ", is not valid. It needs to be greater or equal "
-                  << "to one.");
-
 private:
 
   /**
index 1bf2e2202f1a1a6538f5a6e8902e809cfc83a4ea..f98c94d12f168208bb37f702e4450e85ebe83fd1 100644 (file)
@@ -37,6 +37,109 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int, int> class FEValuesBase;
 
+
+/**
+ * A namespace for exceptions that are used throughout the DataOut*
+ * collection of classes.
+ */
+namespace DataOutExceptions
+{
+  /**
+   * Exception
+   */
+  DeclException1 (ExcInvalidNumberOfSubdivisions,
+                  int,
+                  << "The number of subdivisions per patch, " << arg1
+                  << ", is not valid. It needs to be greater or equal to "
+                  "one, or zero if you want it to be determined "
+                  "automatically.");
+
+  /**
+   * Exception
+   */
+  DeclExceptionMsg (ExcNoTriangulationSelected,
+                    "For the operation you are attempting, you first need to "
+                    "tell the DataOut or related object which DoFHandler or "
+                    "triangulation you would like to work on.");
+
+  /**
+   * Exception
+   */
+  DeclExceptionMsg (ExcNoDoFHandlerSelected,
+                    "For the operation you are attempting, you first need to "
+                    "tell the DataOut or related object which DoFHandler "
+                    "you would like to work on.");
+
+  /**
+   * Exception
+   */
+  DeclException3 (ExcInvalidVectorSize,
+                  int, int, int,
+                  << "The vector has size " << arg1
+                  << " but the DoFHandler object says that there are " << arg2
+                  << " degrees of freedom and there are " << arg3
+                  << " active cells. The size of your vector needs to be"
+                  << " either equal to the number of degrees of freedom, or"
+                  << " equal to the number of active cells.");
+  /**
+   * Exception
+   */
+  DeclException2 (ExcInvalidCharacter,
+                  std::string, size_t,
+                  << "Please use only the characters [a-zA-Z0-9_<>()] for" << std::endl
+                  << "description strings since some graphics formats will only accept these."
+                  << std::endl
+                  << "The string you gave was <" << arg1
+                  << ">, within which the invalid character is <" << arg1[arg2]
+                  << ">." << std::endl);
+  /**
+   * Exception
+   */
+  DeclExceptionMsg (ExcOldDataStillPresent,
+                    "When attaching a triangulation or DoFHandler object, it is "
+                    "not allowed if old data vectors are still referenced. If "
+                    "you want to reuse an object of the current type, you first "
+                    "need to call the 'clear_data_vector()' function.");
+  /**
+   * Exception
+   */
+  DeclException2 (ExcInvalidNumberOfNames,
+                  int, int,
+                  << "You have to give one name per component in your "
+                  << "data vector. The number you gave was " << arg1
+                  << ", but the number of components is " << arg2);
+  /**
+   * Exception
+   */
+  DeclExceptionMsg (ExcIncompatibleDatasetNames,
+                    "While merging sets of patches, the two sets to be merged "
+                    "need to refer to data that agrees on the names of the "
+                    "various variables represented. In other words, you "
+                    "cannot merge sets of patches that originate from "
+                    "entirely unrelated simulations.");
+  /**
+   * Exception
+   */
+  DeclExceptionMsg (ExcIncompatiblePatchLists,
+                    "While merging sets of patches, the two sets to be merged "
+                    "need to refer to data that agrees on the number of "
+                    "subdivisions and other properties. In other words, you "
+                    "cannot merge sets of patches that originate from "
+                    "entirely unrelated simulations.");
+
+  DeclException2 (ExcInvalidVectorDeclaration,
+                  int, std::string,
+                  << "When declaring that a number of components in a data\n"
+                  << "set to be output logically form a vector instead of\n"
+                  << "simply a set of scalar fields, you need to specify\n"
+                  << "this for all relevant components. Furthermore,\n"
+                  << "vectors must always consist of exactly <dim>\n"
+                  << "components. However, the vector component at\n"
+                  << "position " << arg1 << " with name <" << arg2
+                  << "> does not satisfy these conditions.");
+}
+
+
 namespace internal
 {
   namespace DataOut
@@ -698,90 +801,6 @@ public:
    */
   std::size_t memory_consumption () const;
 
-  /**
-   * Exception
-   */
-  DeclExceptionMsg (ExcNoTriangulationSelected,
-                    "For the operation you are attempting, you first need to "
-                    "tell the DataOut or related object which DoFHandler or "
-                    "triangulation you would like to work on.");
-
-  /**
-   * Exception
-   */
-  DeclExceptionMsg (ExcNoDoFHandlerSelected,
-                    "For the operation you are attempting, you first need to "
-                    "tell the DataOut or related object which DoFHandler "
-                    "you would like to work on.");
-
-  /**
-   * Exception
-   */
-  DeclException3 (ExcInvalidVectorSize,
-                  int, int, int,
-                  << "The vector has size " << arg1
-                  << " but the DoFHandler object says that there are " << arg2
-                  << " degrees of freedom and there are " << arg3
-                  << " active cells. The size of your vector needs to be"
-                  << " either equal to the number of degrees of freedom, or"
-                  << " equal to the number of active cells.");
-  /**
-   * Exception
-   */
-  DeclException2 (ExcInvalidCharacter,
-                  std::string, size_t,
-                  << "Please use only the characters [a-zA-Z0-9_<>()] for" << std::endl
-                  << "description strings since some graphics formats will only accept these."
-                  << std::endl
-                  << "The string you gave was <" << arg1
-                  << ">, within which the invalid character is <" << arg1[arg2]
-                  << ">." << std::endl);
-  /**
-   * Exception
-   */
-  DeclExceptionMsg (ExcOldDataStillPresent,
-                    "When attaching a triangulation or DoFHandler object, it is "
-                    "not allowed if old data vectors are still referenced. If "
-                    "you want to reuse an object of the current type, you first "
-                    "need to call the 'clear_data_vector()' function.");
-  /**
-   * Exception
-   */
-  DeclException2 (ExcInvalidNumberOfNames,
-                  int, int,
-                  << "You have to give one name per component in your "
-                  << "data vector. The number you gave was " << arg1
-                  << ", but the number of components is " << arg2);
-  /**
-   * Exception
-   */
-  DeclExceptionMsg (ExcIncompatibleDatasetNames,
-                    "While merging sets of patches, the two sets to be merged "
-                    "need to refer to data that agrees on the names of the "
-                    "various variables represented. In other words, you "
-                    "cannot merge sets of patches that originate from "
-                    "entirely unrelated simulations.");
-  /**
-   * Exception
-   */
-  DeclExceptionMsg (ExcIncompatiblePatchLists,
-                    "While merging sets of patches, the two sets to be merged "
-                    "need to refer to data that agrees on the number of "
-                    "subdivisions and other properties. In other words, you "
-                    "cannot merge sets of patches that originate from "
-                    "entirely unrelated simulations.");
-
-  DeclException2 (ExcInvalidVectorDeclaration,
-                  int, std::string,
-                  << "When declaring that a number of components in a data\n"
-                  << "set to be output logically form a vector instead of\n"
-                  << "simply a set of scalar fields, you need to specify\n"
-                  << "this for all relevant components. Furthermore,\n"
-                  << "vectors must always consist of exactly <dim>\n"
-                  << "components. However, the vector component at\n"
-                  << "position " << arg1 << " with name <" << arg2
-                  << "> does not satisfy these conditions.");
-
 protected:
   /**
    * Abbreviate the somewhat lengthy name for the Patch class.
@@ -876,17 +895,17 @@ merge_patches (const DataOut_DoFData<DH2,patch_dim,patch_space_dim> &source,
   // check equality of component
   // names
   Assert (get_dataset_names() == source.get_dataset_names(),
-          ExcIncompatibleDatasetNames());
+          DataOutExceptions::ExcIncompatibleDatasetNames());
   // make sure patches are compatible. we'll
   // assume that if the first respective
   // patches are ok that all the other ones
   // are ok as well
   Assert (patches[0].n_subdivisions == source_patches[0].n_subdivisions,
-          ExcIncompatiblePatchLists());
+          DataOutExceptions::ExcIncompatiblePatchLists());
   Assert (patches[0].data.n_rows() == source_patches[0].data.n_rows(),
-          ExcIncompatiblePatchLists());
+          DataOutExceptions::ExcIncompatiblePatchLists());
   Assert (patches[0].data.n_cols() == source_patches[0].data.n_cols(),
-          ExcIncompatiblePatchLists());
+          DataOutExceptions::ExcIncompatiblePatchLists());
 
   // check equality of the vector data
   // specifications
index 08cffd1e421e1972bb7c432a7eb12d0ca05fe1af..97f0798edb134d618f3f2453ea98dfd11aa0eaeb 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2000 - 2014 by the deal.II authors
+// Copyright (C) 2000 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -218,15 +218,6 @@ public:
    */
   virtual FaceDescriptor next_face (const FaceDescriptor &face);
 
-  /**
-   * Exception
-   */
-  DeclException1 (ExcInvalidNumberOfSubdivisions,
-                  int,
-                  << "The number of subdivisions per patch, " << arg1
-                  << ", is not valid. It needs to be greater or equal "
-                  << "to one.");
-
 private:
   /**
    * Parameter deciding between surface meshes and full wire basket.
index 5677465b2b1454bce27d698acf9a1fb4f2a802b4..6cc30c08e2d5ecea818e1e4ff01c48133a7d35d9 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2000 - 2014 by the deal.II authors
+// Copyright (C) 2000 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -178,15 +178,6 @@ public:
    */
   virtual cell_iterator next_cell (const cell_iterator &cell);
 
-  /**
-   * Exception
-   */
-  DeclException1 (ExcInvalidNumberOfSubdivisions,
-                  int,
-                  << "The number of subdivisions per patch, " << arg1
-                  << ", is not valid. It needs to be greater or equal to "
-                  "one, or zero if you want it to be determined "
-                  "automatically.");
   /**
    * Exception
    */
index c74e52ea5e99e3c726755e7dbb520a52cee78e5c..8d8e0489ac23e78b3c15e9dd30562198f32edcc1 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2014 by the deal.II authors
+// Copyright (C) 1999 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -21,6 +21,7 @@
 #include <deal.II/base/data_out_base.h>
 #include <deal.II/base/smartpointer.h>
 #include <deal.II/lac/vector.h>
+#include <deal.II/numerics/data_out_dof_data.h>
 
 #include <string>
 #include <vector>
@@ -244,43 +245,6 @@ public:
    */
   std::size_t memory_consumption () const;
 
-  /**
-   * Exception
-   */
-  DeclExceptionMsg (ExcNoDoFHandlerSelected,
-                    "For the operation you are attempting, you first need to "
-                    "tell the DataOut or related object which DoFHandler "
-                    "you would like to work on.");
-  /**
-   * Exception
-   */
-  DeclException3 (ExcInvalidVectorSize,
-                  int, int, int,
-                  << "The vector has size " << arg1
-                  << " but the DoFHandler object says that there are " << arg2
-                  << " degrees of freedom and there are " << arg3
-                  << " active cells. The size of your vector needs to be"
-                  << " either equal to the number of degrees of freedom, or"
-                  << " equal to the number of active cells.");
-  /**
-   * Exception
-   */
-  DeclException2 (ExcInvalidCharacter,
-                  std::string, size_t,
-                  << "Please use only the characters [a-zA-Z0-9_<>()] for" << std::endl
-                  << "description strings since some graphics formats will only accept these."
-                  << std::endl
-                  << "The string you gave was <" << arg1
-                  << ">, within which the invalid character is <" << arg1[arg2]
-                  << ">." << std::endl);
-  /**
-   * Exception
-   */
-  DeclException2 (ExcInvalidNumberOfNames,
-                  int, int,
-                  << "You have to give one name per component in your "
-                  << "data vector. The number you gave was " << arg1
-                  << ", but the number of components is " << arg2);
   /**
    * Exception
    */
@@ -308,14 +272,6 @@ public:
                   std::string,
                   << "You tried to declare a component of a data vector with "
                   << "the name <" << arg1 << ">, but that name is already used.");
-  /**
-   * Exception
-   */
-  DeclException1 (ExcInvalidNumberOfSubdivisions,
-                  int,
-                  << "The number of subdivisions per patch, " << arg1
-                  << ", is not valid. It needs to be greater or equal "
-                  << "to one.");
 
 private:
   /**
index 75c1b41e1056350006ec5cf612ddd5e6803ee57e..29397cf3ba046d38bd17054a7a4f300f3bff455e 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2014 by the deal.II authors
+// Copyright (C) 1999 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -321,15 +321,14 @@ void DataOut<dim,DH>::build_patches (const Mapping<DH::dimension,DH::space_dimen
   // Check consistency of redundant template parameter
   Assert (dim==DH::dimension, ExcDimensionMismatch(dim, DH::dimension));
 
-  typedef DataOut_DoFData<DH, DH::dimension, DH::space_dimension> BaseClass;
   Assert (this->triangulation != 0,
-          typename BaseClass::ExcNoTriangulationSelected());
+          DataOutExceptions::ExcNoTriangulationSelected());
 
   const unsigned int n_subdivisions = (n_subdivisions_ != 0)
                                       ? n_subdivisions_
                                       : this->default_subdivisions;
   Assert (n_subdivisions >= 1,
-          ExcInvalidNumberOfSubdivisions(n_subdivisions));
+          DataOutExceptions::ExcInvalidNumberOfSubdivisions(n_subdivisions));
 
   // First count the cells we want to create patches of. Also fill the object
   // that maps the cell indices to the patch numbers, as this will be needed
index 997918107aba514d64f25d8b5f3fa8f928639ab1..5cd13670e7a5e33157421b87a6aa2953b4de3103 100644 (file)
@@ -326,11 +326,10 @@ namespace internal
         Assert (names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
                                            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                            "0123456789_<>()") == std::string::npos,
-                typename dealii::DataOut<DH::dimension>::
-                ExcInvalidCharacter (names[i],
-                                     names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
-                                                                "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-                                                                "0123456789_<>()")));
+                DataOutExceptions::ExcInvalidCharacter (names[i],
+                                                        names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
+                                                            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                                                            "0123456789_<>()")));
     }
 
 
@@ -356,11 +355,10 @@ namespace internal
         Assert (names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
                                            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                            "0123456789_<>()") == std::string::npos,
-                typename dealii::DataOut<DH::dimension>::
-                ExcInvalidCharacter (names[i],
-                                     names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
-                                                                "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-                                                                "0123456789_<>()")));
+                DataOutExceptions::ExcInvalidCharacter (names[i],
+                                                        names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
+                                                            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                                                            "0123456789_<>()")));
     }
 
 
@@ -652,8 +650,10 @@ void
 DataOut_DoFData<DH,patch_dim,patch_space_dim>::
 attach_dof_handler (const DH &d)
 {
-  Assert (dof_data.size() == 0, ExcOldDataStillPresent());
-  Assert (cell_data.size() == 0, ExcOldDataStillPresent());
+  Assert (dof_data.size() == 0,
+          DataOutExceptions::ExcOldDataStillPresent());
+  Assert (cell_data.size() == 0,
+          DataOutExceptions::ExcOldDataStillPresent());
 
   triangulation = SmartPointer<const Triangulation<DH::dimension,DH::space_dimension> >(&d.get_tria(), typeid(*this).name());
   dofs = SmartPointer<const DH>(&d, typeid(*this).name());
@@ -666,8 +666,10 @@ void
 DataOut_DoFData<DH,patch_dim,patch_space_dim>::
 attach_triangulation (const Triangulation<DH::dimension,DH::space_dimension> &tria)
 {
-  Assert (dof_data.size() == 0, ExcOldDataStillPresent());
-  Assert (cell_data.size() == 0, ExcOldDataStillPresent());
+  Assert (dof_data.size() == 0,
+          DataOutExceptions::ExcOldDataStillPresent());
+  Assert (cell_data.size() == 0,
+          DataOutExceptions::ExcOldDataStillPresent());
 
   triangulation = SmartPointer<const Triangulation<DH::dimension,DH::space_dimension> >(&tria, typeid(*this).name());
 }
@@ -685,7 +687,8 @@ add_data_vector (const VECTOR                             &vec,
                  const DataVectorType                      type,
                  const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
 {
-  Assert (triangulation != 0, ExcNoTriangulationSelected ());
+  Assert (triangulation != 0,
+          DataOutExceptions::ExcNoTriangulationSelected ());
   const unsigned int n_components =
     dofs != 0 ? dofs->get_fe().n_components () : 1;
 
@@ -723,7 +726,8 @@ add_data_vector (const VECTOR                             &vec,
                  const DataVectorType                      type,
                  const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation_)
 {
-  Assert (triangulation != 0, ExcNoTriangulationSelected ());
+  Assert (triangulation != 0,
+          DataOutExceptions::ExcNoTriangulationSelected ());
 
   const std::vector<DataComponentInterpretation::DataComponentInterpretation> &
   data_component_interpretation
@@ -757,17 +761,19 @@ add_data_vector (const VECTOR                             &vec,
               ExcDimensionMismatch (vec.size(),
                                     triangulation->n_active_cells()));
       Assert (names.size() == 1,
-              ExcInvalidNumberOfNames (names.size(), 1));
+              DataOutExceptions::ExcInvalidNumberOfNames (names.size(), 1));
       break;
 
     case type_dof_data:
-      Assert (dofs != 0, ExcNoDoFHandlerSelected ());
+      Assert (dofs != 0,
+              DataOutExceptions::ExcNoDoFHandlerSelected ());
       Assert (vec.size() == dofs->n_dofs(),
-              ExcInvalidVectorSize (vec.size(),
-                                    dofs->n_dofs(),
-                                    triangulation->n_active_cells()));
+              DataOutExceptions::ExcInvalidVectorSize (vec.size(),
+                                                       dofs->n_dofs(),
+                                                       triangulation->n_active_cells()));
       Assert (names.size() == dofs->get_fe().n_components(),
-              ExcInvalidNumberOfNames (names.size(), dofs->get_fe().n_components()));
+              DataOutExceptions::ExcInvalidNumberOfNames (names.size(),
+                                                          dofs->get_fe().n_components()));
       break;
 
     case type_automatic:
@@ -799,12 +805,13 @@ add_data_vector (const VECTOR                           &vec,
   // things a bit simpler, we also don't need to deal with some of the other
   // stuff and use a different constructor of DataEntry
 
-  Assert (dofs != 0, ExcNoDoFHandlerSelected ());
+  Assert (dofs != 0,
+          DataOutExceptions::ExcNoDoFHandlerSelected ());
 
   Assert (vec.size() == dofs->n_dofs(),
-          ExcInvalidVectorSize (vec.size(),
-                                dofs->n_dofs(),
-                                dofs->get_tria().n_active_cells()));
+          DataOutExceptions::ExcInvalidVectorSize (vec.size(),
+                                                   dofs->n_dofs(),
+                                                   dofs->get_tria().n_active_cells()));
 
   internal::DataOut::DataEntryBase<DH> *new_entry
     = new internal::DataOut::DataEntry<DH,VECTOR>(dofs, &vec, &data_postprocessor);
@@ -1019,14 +1026,14 @@ DataOut_DoFData<DH,patch_dim,patch_space_dim>::get_vector_data_ranges () const
           // deal with vectors
           Assert (i+patch_space_dim <=
                   (*d)->n_output_variables,
-                  ExcInvalidVectorDeclaration (i,
-                                               (*d)->names[i]));
+                  DataOutExceptions::ExcInvalidVectorDeclaration (i,
+                                                                  (*d)->names[i]));
           for (unsigned int dd=1; dd<patch_space_dim; ++dd)
             Assert ((*d)->data_component_interpretation[i+dd]
                     ==
                     DataComponentInterpretation::component_is_part_of_vector,
-                    ExcInvalidVectorDeclaration (i,
-                                                 (*d)->names[i]));
+                    DataOutExceptions::ExcInvalidVectorDeclaration (i,
+                                                                    (*d)->names[i]));
 
           // all seems alright, so figure out
           // whether there is a common name
@@ -1102,7 +1109,8 @@ DataOut_DoFData<DH,patch_dim,patch_space_dim>::get_finite_elements() const
   finite_elements(this->dof_data.size());
   for (unsigned int i=0; i<this->dof_data.size(); ++i)
     {
-      Assert (dof_data[i]->dof_handler != 0, ExcNoDoFHandlerSelected ());
+      Assert (dof_data[i]->dof_handler != 0,
+              DataOutExceptions::ExcNoDoFHandlerSelected ());
 
       // avoid creating too many finite elements and doing a lot of work on
       // initializing FEValues downstream: if two DoFHandlers are the same
index 9fb37c14008fc531489ac01e3961c24e12b6eb51..65c4d9d3f79b78d366f305b34c607f30d4e6e9a8 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2000 - 2014 by the deal.II authors
+// Copyright (C) 2000 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -284,11 +284,10 @@ void DataOutFaces<dim,DH>::build_patches (const Mapping<dimension> &mapping,
                                       : this->default_subdivisions;
 
   Assert (n_subdivisions >= 1,
-          ExcInvalidNumberOfSubdivisions(n_subdivisions));
+          DataOutExceptions::ExcInvalidNumberOfSubdivisions(n_subdivisions));
 
-  typedef DataOut_DoFData<DH,dimension+1> BaseClass;
   Assert (this->triangulation != 0,
-          typename BaseClass::ExcNoTriangulationSelected());
+          DataOutExceptions::ExcNoTriangulationSelected());
 
   unsigned int n_datasets     = this->cell_data.size();
   for (unsigned int i=0; i<this->dof_data.size(); ++i)
index f2a43a9c4fcfce8511875608df0febba115a2d10..1f5e0c34fb8b300fc61284ca7741c38bef267d41 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2000 - 2014 by the deal.II authors
+// Copyright (C) 2000 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -405,15 +405,14 @@ void DataOutRotation<dim,DH>::build_patches (const unsigned int n_patches_per_ci
   // Check consistency of redundant
   // template parameter
   Assert (dim==dimension, ExcDimensionMismatch(dim, dimension));
-  typedef DataOut_DoFData<DH,dimension+1> BaseClass;
   Assert (this->triangulation != 0,
-          typename BaseClass::ExcNoTriangulationSelected());
+          DataOutExceptions::ExcNoTriangulationSelected());
 
   const unsigned int n_subdivisions = (nnnn_subdivisions != 0)
                                       ? nnnn_subdivisions
                                       : this->default_subdivisions;
   Assert (n_subdivisions >= 1,
-          ExcInvalidNumberOfSubdivisions(n_subdivisions));
+          DataOutExceptions::ExcInvalidNumberOfSubdivisions(n_subdivisions));
 
   unsigned int n_datasets=this->cell_data.size();
   for (unsigned int i=0; i<this->dof_data.size(); ++i)
index 32b2a272db7e33279e6b1e096e80f24da3907a62..8b9bc57ea4368ff68fd900a2bd58eb0339969b65 100644 (file)
@@ -168,7 +168,8 @@ template <typename number>
 void DataOutStack<dim,spacedim,DH>::add_data_vector (const Vector<number> &vec,
                                                      const std::vector<std::string> &names)
 {
-  Assert (dof_handler != 0, ExcNoDoFHandlerSelected ());
+  Assert (dof_handler != 0,
+          DataOutExceptions::ExcNoDoFHandlerSelected ());
   // either cell data and one name,
   // or dof data and n_components names
   Assert (((vec.size() == dof_handler->get_tria().n_active_cells()) &&
@@ -176,15 +177,16 @@ void DataOutStack<dim,spacedim,DH>::add_data_vector (const Vector<number> &vec,
           ||
           ((vec.size() == dof_handler->n_dofs()) &&
            (names.size() == dof_handler->get_fe().n_components())),
-          ExcInvalidNumberOfNames (names.size(), dof_handler->get_fe().n_components()));
+          DataOutExceptions::ExcInvalidNumberOfNames (names.size(),
+                                                      dof_handler->get_fe().n_components()));
   for (unsigned int i=0; i<names.size(); ++i)
     Assert (names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
                                        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                        "0123456789_<>()") == std::string::npos,
-            ExcInvalidCharacter (names[i],
-                                 names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
-                                                            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-                                                            "0123456789_<>()")));
+            DataOutExceptions::ExcInvalidCharacter (names[i],
+                                                    names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
+                                                        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                                                        "0123456789_<>()")));
 
   if (vec.size() == dof_handler->n_dofs())
     {
@@ -240,8 +242,9 @@ void DataOutStack<dim,spacedim,DH>::build_patches (const unsigned int nnnn_subdi
                                 : this->default_subdivisions;
 
   Assert (n_subdivisions >= 1,
-          ExcInvalidNumberOfSubdivisions(n_subdivisions));
-  Assert (dof_handler != 0, ExcNoDoFHandlerSelected());
+          DataOutExceptions::ExcInvalidNumberOfSubdivisions(n_subdivisions));
+  Assert (dof_handler != 0,
+          DataOutExceptions::ExcNoDoFHandlerSelected());
 
   const unsigned int n_components   = dof_handler->get_fe().n_components();
   const unsigned int n_datasets     = dof_data.size() * n_components +

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.