From: Wolfgang Bangerth Date: Sun, 15 Mar 2015 05:38:39 +0000 (-0500) Subject: Go through all error messages for the data_out_* assertions. X-Git-Tag: v8.3.0-rc1~369^2~9 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a931173523c9cae80827d3a980927c5d03e76f6;p=dealii.git Go through all error messages for the data_out_* assertions. --- diff --git a/include/deal.II/numerics/data_out_rotation.h b/include/deal.II/numerics/data_out_rotation.h index af9c5688cf..5677465b2b 100644 --- a/include/deal.II/numerics/data_out_rotation.h +++ b/include/deal.II/numerics/data_out_rotation.h @@ -184,13 +184,21 @@ public: DeclException1 (ExcInvalidNumberOfSubdivisions, int, << "The number of subdivisions per patch, " << arg1 - << ", is not valid."); + << ", is not valid. It needs to be greater or equal to " + "one, or zero if you want it to be determined " + "automatically."); /** * Exception */ DeclException1 (ExcRadialVariableHasNegativeValues, double, - << "The radial variable attains a negative value of " << arg1); + << "You are attempting to use this class on a triangulation " + "in which some vertices have a negative radial coordinate " + "value of " + << arg1 + << ". If you rotate such a triangulation around an " + "axis, you will get (dim+1)-dimensional meshes " + "that are not likely what you hoped to see."); private: /** diff --git a/include/deal.II/numerics/data_out_stack.h b/include/deal.II/numerics/data_out_stack.h index 5874e0b738..c74e52ea5e 100644 --- a/include/deal.II/numerics/data_out_stack.h +++ b/include/deal.II/numerics/data_out_stack.h @@ -247,16 +247,21 @@ public: /** * Exception */ - DeclException0 (ExcNoDoFHandlerSelected); + 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 objects says there are " << arg2 + << " but the DoFHandler object says that there are " << arg2 << " degrees of freedom and there are " << arg3 - << " active cells."); + << " 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 */ @@ -266,7 +271,7 @@ public: << "description strings since some graphics formats will only accept these." << std::endl << "The string you gave was <" << arg1 - << ">, the invalid character is <" << arg1[arg2] + << ">, within which the invalid character is <" << arg1[arg2] << ">." << std::endl); /** * Exception @@ -282,15 +287,20 @@ public: DeclException1 (ExcVectorNotDeclared, std::string, << "The data vector for which the first component has the name " - << arg1 << " has not been declared before."); + << arg1 << " has not been added before."); /** * Exception */ - DeclException0 (ExcDataNotCleared); + DeclExceptionMsg (ExcDataNotCleared, + "You cannot start a new time/parameter step before calling " + "finish_parameter_value() on the previous step."); /** * Exception */ - DeclException0 (ExcDataAlreadyAdded); + DeclExceptionMsg (ExcDataAlreadyAdded, + "You cannot declare additional vectors after already calling " + "build_patches(). All data vectors need to be declared " + "before you call this function the first time."); /** * Exception */ @@ -304,7 +314,8 @@ public: DeclException1 (ExcInvalidNumberOfSubdivisions, int, << "The number of subdivisions per patch, " << arg1 - << ", is not valid."); + << ", is not valid. It needs to be greater or equal " + << "to one."); private: /** diff --git a/source/numerics/data_out_stack.cc b/source/numerics/data_out_stack.cc index 4cc8c5beea..32b2a272db 100644 --- a/source/numerics/data_out_stack.cc +++ b/source/numerics/data_out_stack.cc @@ -53,11 +53,10 @@ void DataOutStack::new_parameter_value (const double p, parameter = p; parameter_step = dp; - // check whether the user called @p{finish_...} - // at the end of the previous parameter step + // check whether the user called finish_parameter_value() at the end of the previous + // parameter step // - // this is to prevent serious waste of - // memory + // this is to prevent serious waste of memory for (typename std::vector::const_iterator i=dof_data.begin(); i!=dof_data.end(); ++i) Assert (i->data.size() == 0,