Reference documentation for deal.II version 8.4.1
Namespaces | Classes | Macros | Enumerations | Functions
Exceptions and assertions

Namespaces

 deal_II_exceptions
 
 deal_II_exceptions::internals
 
 StandardExceptions
 

Classes

class  ExceptionBase
 

Macros

#define Assert(cond, exc)
 
#define AssertNothrow(cond, exc)
 
#define AssertThrow(cond, exc)
 
#define DeclException0(Exception0)   static ::ExceptionBase& Exception0 ()
 
#define DeclExceptionMsg(Exception, defaulttext)   static ::ExceptionBase& Exception ()
 
#define DeclException1(Exception1, type1, outsequence)   static ::ExceptionBase& Exception1 (type1 arg1) throw (errortext outsequence)
 
#define DeclException2(Exception2, type1, type2, outsequence)   static ::ExceptionBase& Exception2 (type1 arg1, type2 arg2) throw (errortext outsequence)
 
#define DeclException3(Exception3, type1, type2, type3, outsequence)   static ::ExceptionBase& Exception3 (type1 arg1, type2 arg2, type3 arg3) throw (errortext outsequence)
 
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)   static ::ExceptionBase& Exception4 (type1 arg1, type2 arg2, type3 arg3, type4 arg4) throw (errortext outsequence)
 
#define DeclException5(Exception5, type1, type2, type3, type4, type5, outsequence)   static ::ExceptionBase& Exception5 (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) throw (errortext outsequence)
 
#define AssertDimension(dim1, dim2)
 
#define AssertVectorVectorDimension(vec, dim1, dim2)
 
#define AssertIndexRange(index, range)
 
#define AssertIsFinite(number)
 

Enumerations

enum  deal_II_exceptions::internals::ExceptionHandling
 

Functions

 ConvergenceTable::DeclException0 (ExcWrongValueType)
 
 ConvergenceTable::DeclException1 (ExcRateColumnAlreadyExists, std::string,<< "Rate column <"<< arg1<< "> does already exist.")
 
 DataOutBase::Patch< dim, spacedim >::DeclException2 (ExcInvalidCombinationOfDimensions, int, int,<< "It is not possible to have a structural dimension of "<< arg1<< " to be larger than the space dimension of the surrounding"<< " space "<< arg2)
 
 DataOutBase::DeclException2 (ExcInvalidDatasetSize, int, int,<< "The number of points in this data set is "<< arg1<< ", but we expected "<< arg2<< " in each space direction.")
 
 DataOutBase::DeclException0 (ExcNoPatches)
 
 DataOutBase::DeclException0 (ExcTecplotAPIError)
 
 DataOutBase::DeclException1 (ExcErrorOpeningTecplotFile, char *,<< "There was an error opening Tecplot file "<< arg1<< " for output")
 
 StandardExceptions::DeclExceptionMsg (ExcDivideByZero,"A piece of code is attempting a division by zero. This is ""likely going to lead to results that make no sense.")
 
::ExceptionBaseStandardExceptions::ExcNumberNotFinite (std::complex< double > arg1) throw (errortext << "In a significant number of places, deal.II checks that some intermediate " << "value is a finite number (as opposed to plus or minus infinity, or " << "NaN/Not a Number). In the current function, we encountered a number " << "that is not finite (its value is " << arg1 << " and therefore " << "violates the current assertion.\n\n" << "This may be due to the fact that some operation in this function " << "created such a value, or because one of the arguments you passed " << "to the function already had this value from some previous " << "operation. In the latter case, this function only triggered the " << "error but may not actually be responsible for the computation of " << "the number that is not finite.\n\n" << "There are two common cases where this situation happens. First, your " << "code (or something in deal.II) divides by zero in a place where this " << "should not happen. Or, you are trying to solve a linear system " << "with an unsuitable solver (such as an indefinite or non-symmetric " << "linear system using a Conjugate Gradient solver); such attempts " << "oftentimes yield an operation somewhere that tries to divide " << "by zero or take the square root of a negative value.\n\n" << "In any case, when trying to find the source of the error, " << "recall that the location where you are getting this error is " << "simply the first place in the program where there is a check " << "that a number (e.g., an element of a solution vector) is in fact " << "finite, but that the actual error that computed the number " << "may have happened far earlier. To find this location, you " << "may want to add checks for finiteness in places of your " << "program visited before the place where this error is produced." << "One way to check for finiteness is to use the 'AssertIsFinite' " << "macro." ); DeclExceptionMsg (ExcOutOfMemory, "Your program tried to allocate some memory but this " "allocation failed. Typically, this either means that " "you simply do not have enough memory in your system, " "or that you are (erroneously) trying to allocate " "a chunk of memory that is simply beyond all reasonable " "size, for example because the size of the object has " "been computed incorrectly."); static ::ExceptionBase& ExcMemoryLeak ( int arg1) throw (errortext << "Destroying memory handler while " << arg1 << " objects are still allocated" ); DeclExceptionMsg (ExcIO, "An input/output error has occurred. There are a number of " "reasons why this may be happening, both for reading and " "writing operations." "\n\n" "If this happens during an operation that tries to read " "data: First, you may be " "trying to read from a file that doesn't exist or that is " "not readable given its file permissions. Second, deal.II " "uses this error at times if it tries to " "read information from a file but where the information " "in the file does not correspond to the expected format. " "An example would be a truncated file, or a mesh file " "that contains not only sections that describe the " "vertices and cells, but also sections for additional " "data that deal.II does not understand." "\n\n" "If this happens during an operation that tries to write " "data: you may be trying to write to a file to which file " "or directory permissions do not allow you to write. A " "typical example is where you specify an output file in " "a directory that does not exist."); static ::ExceptionBase& ExcFileNotOpen ( char * arg1) throw (errortext << "Could not open file " << arg1 ); DeclExceptionMsg (ExcNotImplemented, "You are trying to use functionality in deal.II that is " "currently not implemented. In many cases, this indicates " "that there simply didn't appear much of a need for it, or " "that the author of the original code did not have the " "time to implement a particular case. If you hit this " "exception, it is therefore worth the time to look into " "the code to find out whether you may be able to " "implement the missing functionality. If you do, please " "consider providing a patch to the deal.II development " "sources (see the deal.II website on how to contribute)."); DeclExceptionMsg (ExcInternalError, "This exception -- which is used in many places in the " "library -- usually indicates that some condition which " "the author of the code thought must be satisfied at a " "certain point in an algorithm, is not fulfilled. An " "example would be that the first part of an algorithm " "sorts elements of an array in ascending order, and " "a second part of the algorithm later encounters an " "an element that is not larger than the previous one." "\n\n" "There is usually not very much you can do if you " "encounter such an exception since it indicates an error " "in deal.II, not in your own program. Try to come up with " "the smallest possible program that still demonstrates " "the error and contact the deal.II mailing lists with it " "to obtain help."); DeclExceptionMsg (ExcPureFunctionCalled, "You (or a place in the library) are trying to call a " "function that is declared as a virtual function in a " "base class but that has not been overridden in your " "derived class." "\n\n" "This exception happens in cases where the base class " "cannot provide a useful default implementation for " "the virtual function, but where we also do not want " "to mark the function as abstract (i.e., with '=0' at the end) " "because the function is not essential to the class in many " "contexts. In cases like this, the base class provides " "a dummy implementation that makes the compiler happy, but " "that then throws the current exception." "\n\n" "A concrete example would be the 'Function' class. It declares " "the existence of 'value()' and 'gradient()' member functions, " "and both are marked as 'virtual'. Derived classes have to " "override these functions for the values and gradients of a " "particular function. On the other hand, not every function " "has a gradient, and even for those that do, not every program " "actually needs to evaluate it. Consequently, there is no " "*requirement* that a derived class actually override the " "'gradient()' function (as there would be had it been marked " "as abstract). But, since the base class cannot know how to " "compute the gradient, if a derived class does not override " "the 'gradient()' function and it is called anyway, then the " "default implementation in the base class will simply throw " "an exception." "\n\n" "The exception you see is what happens in cases such as the " "one just illustrated. To fix the problem, you need to " "investigate whether the function being called should indeed have " "been called; if the answer is 'yes', then you need to " "implement the missing override in your class."); static ::ExceptionBase& ExcInvalidConstructorCall (); static ::ExceptionBase& ExcNotInitialized (); static ::ExceptionBase& ExcInvalidState (); static ::ExceptionBase& ExcImpossibleInDim ( int arg1) throw (errortext << "You are trying to execute functionality that is " << "impossible in " << arg1 << "d or simply does not make any sense." ); DeclExceptionMsg(ExcZero, "In a check in the code, deal.II encountered a zero in " "a place where this does not make sense. See the condition " "that was being checked and that is printed further up " "in the error message to get more information on what " "the erroneous zero corresponds to."); DeclExceptionMsg(ExcEmptyObject, "The object you are trying to access is empty but it makes " "no sense to attempt the operation you are trying on an " "empty object."); static ::ExceptionBase& ExcDimensionMismatch ( std::size_t arg1, std::size_t arg2) throw (errortext << "Dimension " << arg1 << " not equal to " << arg2 ); static ::ExceptionBase& ExcDimensionMismatch2 ( int arg1, int arg2, int arg3) throw (errortext << "Dimension " << arg1 << " neither equal to " << arg2 << " nor to " << arg3 ); static ::ExceptionBase& ExcIndexRange ( int arg1, int arg2, int arg3) throw (errortext << "Index " << arg1 << " is not in the half-open range [" << arg2 << "," << arg3 << ")." << (arg2==arg3 ? " In the current case, this half-open range is in fact empty, " "suggesting that you are accessing an element of an empty " "collection such as a vector that has not been set to the " "correct size." : "") )
 
template<typename T >
::ExceptionBaseStandardExceptions::ExcIndexRangeType (T arg1, T arg2, T arg3)." << (arg2 throw (errortext << "Index " << arg1 << " is not in the half-open range [" << arg2 << "," << arg3 << ")
 
::ExceptionBaseStandardExceptions::ExcLowerRange (int arg1, int arg2)." ) throw (errortext << "Number " << arg1 << " must be larger than or equal " << arg2 << ")
 
template<typename T >
::ExceptionBaseStandardExceptions::ExcLowerRangeType (T arg1, T arg2) throw (errortext << "Number " << arg1 << " must be larger than or equal " << arg2 << "." )
 
::ExceptionBaseStandardExceptions::ExcNotMultiple (int arg1, int arg2) throw (errortext << "Division " << arg1 << " by " << arg2 << " has remainder different from zero" )
 
 StandardExceptions::DeclExceptionMsg (ExcInvalidIterator,"You are trying to use an iterator, but the iterator is ""in an invalid state. This may indicate that the iterator ""object has not been initialized, or that it has been ""moved beyond the end of the range of valid elements.")
 
 StandardExceptions::DeclExceptionMsg (ExcIteratorPastEnd,"You are trying to use an iterator, but the iterator is ""pointing past the end of the range of valid elements. ""It is not valid to dereference the iterator in this ""case.")
 
::ExceptionBaseStandardExceptions::ExcMessage (std::string arg1) throw (errortext << arg1 )
 
 StandardExceptions::DeclExceptionMsg (ExcGhostsPresent,"You are trying an operation on a vector that is only ""allowed if the vector has no ghost elements, but the ""vector you are operating on does have ghost elements. ""Specifically, vectors with ghost elements are read-only ""and cannot appear in operations that write into these ""vectors.""\n\n""See the glossary entry on 'Ghosted vectors' for more ""information.")
 
 StandardExceptions::DeclExceptionMsg (ExcScalarAssignmentOnlyForZeroValue,"You are trying an operation of the form 'vector=s' with ""a nonzero scalar value 's'. However, such assignments ""are only allowed if the right hand side is zero.")
 
::ExceptionBaseStandardExceptions::ExcNeedsLAPACK ()
 
::ExceptionBaseStandardExceptions::ExcNeedsNetCDF ()
 
::ExceptionBaseStandardExceptions::ExcNeedsFunctionparser ()
 
 FunctionDerivative< dim >::DeclException0 (ExcInvalidFormula)
 
 Patterns::List::DeclException2 (ExcInvalidRange, int, int,<< "The values "<< arg1<< " and "<< arg2<< " do not form a valid range.")
 
 Patterns::Map::DeclException2 (ExcInvalidRange, int, int,<< "The values "<< arg1<< " and "<< arg2<< " do not form a valid range.")
 
 Patterns::MultipleSelection::DeclException1 (ExcCommasNotAllowed, int,<< "A comma was found at position "<< arg1<< " of your input string, but commas are not allowed here.")
 
 ParameterHandler::DeclException1 (ExcEntryAlreadyExists, std::string,<< "The following entry already exists: "<< arg1)
 
 ParameterHandler::DeclException2 (ExcValueDoesNotMatchPattern, std::string, std::string,<< "The string <"<< arg1<< "> does not match the given pattern <"<< arg2<< ">")
 
 ParameterHandler::DeclException0 (ExcAlreadyAtTopLevel)
 
 ParameterHandler::DeclException1 (ExcEntryUndeclared, std::string,<< "You can't ask for entry <"<< arg1<< "> you have not yet declared")
 
 PathSearch::DeclException1 (ExcNoClass, std::string,<< "The class "<< arg1<< " must be registered before referring it in PathSearch")
 
 PathSearch::DeclException2 (ExcFileNotFound, std::string, std::string,<< "The file \""<< arg1<< "\" was not found in the path for files of class "<< arg2)
 
 QuadratureSelector< dim >::DeclException1 (ExcInvalidQGaussOrder, int,<< "You tried to generate a QGauss object with an invalid "<< "number "<< arg1<< " of quadrature points in each coordinate "<< "direction. This number must be greater than or equal "<< "to 1.")
 
 QuadratureSelector< dim >::DeclException2 (ExcInvalidOrder, std::string, unsigned int,<< "You tried to generate a "<< arg1<< " object; no order is needed for objects of this kind, but "<< arg2<< " was given as argument.")
 
 QuadratureSelector< dim >::DeclException1 (ExcInvalidQuadrature, std::string,<< arg1<< " is not a valid name for a quadrature rule.")
 
 Subscriptor::DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\n\n"<< "(Additional information: "<< arg3<< ")\n\n"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.")
 
 Subscriptor::DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.")
 
 TableHandler::DeclException1 (ExcColumnNotExistent, std::string,<< "Column <"<< arg1<< "> does not exist.")
 
 TableHandler::DeclException1 (ExcSuperColumnNotExistent, std::string,<< "Supercolumn <"<< arg1<< "> does not exist.")
 
 TableHandler::DeclException1 (ExcColumnOrSuperColumnNotExistent, std::string,<< "Column or supercolumn <"<< arg1<< "> does not exist.")
 
 TableHandler::DeclException4 (ExcWrongNumberOfDataEntries, std::string, int, std::string, int,<< "Column <"<< arg1<< "> has got "<< arg2<< " rows, but Column <"<< arg3<< "> has got "<< arg4<< ".")
 
 TableHandler::DeclException1 (ExcUndefinedTexFormat, std::string,<< "<"<< arg1<< "> is not a tex column format. Use "<< "'l', 'c', or 'r' to indicate left, centered, or "<< "right aligned text.")
 
 Threads::DummyBarrier::DeclException1 (ExcBarrierSizeNotUseful, int,<< "In single-thread mode, barrier sizes other than 1 are not "<< "useful. You gave "<< arg1<< ".")
 
 Threads::Task< RT >::DeclExceptionMsg (ExcNoTask,"The current object is not associated with a task that ""can be joined. It may have been detached, or you ""may have already joined it in the past.")
 
 DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 (ExcInvalidObject)
 
 DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 (ExcVectorNotEmpty)
 
 DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 (ExcVectorDoesNotMatch)
 
 DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 (ExcMatrixDoesNotMatch)
 
 DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 (ExcNotActive)
 
 DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 (ExcCantCompareIterators)
 
 DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 (ExcInvalidObject)
 
 DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 (ExcVectorNotEmpty)
 
 DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 (ExcVectorDoesNotMatch)
 
 DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 (ExcMatrixDoesNotMatch)
 
 DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 (ExcNotActive)
 
 DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 (ExcCantCompareIterators)
 
 DoFRenumbering::DeclException0 (ExcRenumberingIncomplete)
 
 DoFRenumbering::DeclException0 (ExcInvalidComponentOrder)
 
 DoFRenumbering::DeclException0 (ExcNotDGFEM)
 
 DoFTools::DeclException0 (ExcFiniteElementsDontMatch)
 
 DoFTools::DeclException0 (ExcGridNotCoarser)
 
 DoFTools::DeclException0 (ExcGridsDontMatch)
 
 DoFTools::DeclException0 (ExcNoFESelected)
 
 DoFTools::DeclException0 (ExcInvalidBoundaryIndicator)
 
 FiniteElement< dim, spacedim >::DeclException1 (ExcShapeFunctionNotPrimitive, int,<< "The shape function with index "<< arg1<< " is not primitive, i.e. it is vector-valued and "<< "has more than one non-zero vector component. This "<< "function cannot be called for these shape functions. "<< "Maybe you want to use the same function with the "<< "_component suffix?")
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcFENotPrimitive)
 
 FiniteElement< dim, spacedim >::DeclExceptionMsg (ExcUnitShapeValuesDoNotExist,"You are trying to access the values or derivatives of shape functions ""on the reference cell of an element that does not define its shape ""functions through mapping from the reference cell. Consequently, ""you cannot ask for shape function values or derivatives on the ""reference cell.")
 
 FiniteElement< dim, spacedim >::DeclExceptionMsg (ExcFEHasNoSupportPoints,"You are trying to access the support points of a finite ""element that either has no support points at all, or for ""which the corresponding tables have not been implemented.")
 
 FiniteElement< dim, spacedim >::DeclExceptionMsg (ExcEmbeddingVoid,"You are trying to access the matrices that describe how ""to embed a finite element function on one cell into the ""finite element space on one of its children (i.e., the ""'embedding' or 'prolongation' matrices). However, the ""current finite element can either not define this sort of ""operation, or it has not yet been implemented.")
 
 FiniteElement< dim, spacedim >::DeclExceptionMsg (ExcProjectionVoid,"You are trying to access the matrices that describe how ""to restrict a finite element function from the children ""of one cell to the finite element space defined on their ""parent (i.e., the 'restriction' or 'projection' matrices). ""However, the current finite element can either not define ""this sort of operation, or it has not yet been ""implemented.")
 
 FiniteElement< dim, spacedim >::DeclException2 (ExcWrongInterfaceMatrixSize, int, int,<< "The interface matrix has a size of "<< arg1<< "x"<< arg2<< ", which is not reasonable for the current element ""in the present dimension.")
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcInterpolationNotImplemented)
 
 FETools::DeclException1 (ExcInvalidFEName, std::string,<< "Can't re-generate a finite element from the string '"<< arg1<< "'.")
 
 FETools::DeclException2 (ExcInvalidFEDimension, char, int,<< "The dimension "<< arg1<< " in the finite element string must match "<< "the space dimension "<< arg2<< ".")
 
 FETools::DeclException0 (ExcInvalidFE)
 
 FETools::DeclException0 (ExcFENotPrimitive)
 
 FETools::DeclException0 (ExcTriangulationMismatch)
 
 FETools::DeclException1 (ExcHangingNodesNotAllowed, int,<< "You are using continuous elements on a grid with "<< "hanging nodes but without providing hanging node "<< "constraints. Use the respective function with "<< "additional ConstraintMatrix argument(s), instead."<< (arg1?"":""))
 
 FETools::DeclException0 (ExcGridNotRefinedAtLeastOnce)
 
 FETools::DeclException4 (ExcMatrixDimensionMismatch, int, int, int, int,<< "This is a "<< arg1<< "x"<< arg2<< " matrix, "<< "but should be a "<< arg3<< "x"<< arg4<< " matrix.")
 
 FETools::DeclException1 (ExcLeastSquaresError, double,<< "Least squares fit leaves a gap of "<< arg1)
 
 FETools::DeclException2 (ExcNotGreaterThan, int, int,<< arg1<< " must be greater than "<< arg2)
 
 FEValuesBase< dim, spacedim >::DeclException1 (ExcAccessToUninitializedField, char *,<< ("You are requesting information from an FEValues/FEFaceValues/FESubfaceValues ""object for which this kind of information has not been computed. What ""information these objects compute is determined by the update_* flags you ""pass to the constructor. Here, the operation you are attempting requires ""the <")<< arg1<< "> flag to be set, but it was apparently not specified upon construction.")
 
 FEValuesBase< dim, spacedim >::DeclException0 (ExcCannotInitializeField)
 
 FEValuesBase< dim, spacedim >::DeclException0 (ExcInvalidUpdateFlag)
 
 FEValuesBase< dim, spacedim >::DeclException0 (ExcFEDontMatch)
 
 FEValuesBase< dim, spacedim >::DeclException1 (ExcShapeFunctionNotPrimitive, int,<< "The shape function with index "<< arg1<< " is not primitive, i.e. it is vector-valued and "<< "has more than one non-zero vector component. This "<< "function cannot be called for these shape functions. "<< "Maybe you want to use the same function with the "<< "_component suffix?")
 
 FEValuesBase< dim, spacedim >::DeclException0 (ExcFENotPrimitive)
 
 FESubfaceValues< dim, spacedim >::DeclException0 (ExcReinitCalledWithBoundaryFace)
 
 FESubfaceValues< dim, spacedim >::DeclException0 (ExcFaceHasNoSubfaces)
 
 TriaAccessorExceptions::DeclException0 (ExcCellNotActive)
 
 TriaAccessorExceptions::DeclException0 (ExcCellHasNoChildren)
 
 TriaAccessorExceptions::DeclException0 (ExcCellHasNoParent)
 
 TriaAccessorExceptions::DeclException0 (ExcFacesHaveNoLevel)
 
 internal::Triangulation::TriaObjects< G >::DeclException2 (ExcMemoryInexact, int, int,<< "The containers have sizes "<< arg1<< " and "<< arg2<< ", which is not as expected.")
 
 internal::Triangulation::TriaObjects< G >::DeclException0 (ExcPointerIndexClash)
 
 BlockTrianglePrecondition< number, BlockVectorType >::DeclException1 (ExcNoDiagonal, size_type,<< "No diagonal entry was added for block "<< arg1)
 
 BlockTrianglePrecondition< number, BlockVectorType >::DeclException1 (ExcMultipleDiagonal, size_type,<< "Inverse diagonal entries may not be added in block "<< arg1)
 
 BlockMatrixBase< MatrixType >::DeclException4 (ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.")
 
 BlockMatrixBase< MatrixType >::DeclException4 (ExcIncompatibleColNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing column numbers.")
 
 BlockSparseMatrix< number >::DeclException0 (ExcBlockDimensionMismatch)
 
 BlockSparsityPatternBase< SparsityPatternType >::DeclException4 (ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.")
 
 BlockSparsityPatternBase< SparsityPatternType >::DeclException4 (ExcIncompatibleColNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing column numbers.")
 
 BlockSparsityPatternBase< SparsityPatternType >::DeclException0 (ExcInvalidConstructorCall)
 
 BlockVector< Number >::DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize)
 
 internal::BlockVectorIterators::Iterator< BlockVectorType, Constness >::DeclExceptionMsg (ExcPointerToDifferentVectors,"Your program tried to compare iterators pointing to ""different block vectors. There is no reasonable way ""to do this.")
 
 internal::BlockVectorIterators::Iterator< BlockVectorType, Constness >::DeclExceptionMsg (ExcCastingAwayConstness,"Constructing a non-const iterator from a const ""iterator does not make sense.")
 
 ChunkSparseMatrix< number >::DeclException2 (ExcInvalidIndex, int, int,<< "You are trying to access the matrix entry with index <"<< arg1<< ','<< arg2<< ">, but this entry does not exist in the sparsity pattern""of this matrix.""\n\n""The most common cause for this problem is that you used ""a method to build the sparsity pattern that did not ""(completely) take into account all of the entries you ""will later try to write into. An example would be ""building a sparsity pattern that does not include ""the entries you will write into due to constraints ""on degrees of freedom such as hanging nodes or periodic ""boundary conditions. In such cases, building the ""sparsity pattern will succeed, but you will get errors ""such as the current one at one point or other when ""trying to write into the entries of the matrix.")
 
 ChunkSparseMatrix< number >::DeclException0 (ExcDifferentChunkSparsityPatterns)
 
 ChunkSparseMatrix< number >::DeclException2 (ExcIteratorRange, int, int,<< "The iterators denote a range of "<< arg1<< " elements, but the given number of rows was "<< arg2)
 
 ChunkSparseMatrix< number >::DeclException0 (ExcSourceEqualsDestination)
 
 ChunkSparsityPattern::DeclException1 (ExcInvalidNumber, int,<< "The provided number is invalid here: "<< arg1)
 
 ChunkSparsityPattern::DeclException2 (ExcInvalidIndex, int, int,<< "The given index "<< arg1<< " should be less than "<< arg2<< ".")
 
 ChunkSparsityPattern::DeclException2 (ExcNotEnoughSpace, int, int,<< "Upon entering a new entry to row "<< arg1<< ": there was no free entry any more. "<< std::endl<< "(Maximum number of entries for this row: "<< arg2<< "; maybe the matrix is already compressed?)")
 
 ChunkSparsityPattern::DeclException0 (ExcNotCompressed)
 
 ChunkSparsityPattern::DeclException0 (ExcMatrixIsCompressed)
 
 ChunkSparsityPattern::DeclException0 (ExcEmptyObject)
 
 ChunkSparsityPattern::DeclException0 (ExcInvalidConstructorCall)
 
 ChunkSparsityPattern::DeclException2 (ExcIteratorRange, int, int,<< "The iterators denote a range of "<< arg1<< " elements, but the given number of rows was "<< arg2)
 
 ChunkSparsityPattern::DeclException0 (ExcMETISNotInstalled)
 
 ChunkSparsityPattern::DeclException1 (ExcInvalidNumberOfPartitions, int,<< "The number of partitions you gave is "<< arg1<< ", but must be greater than zero.")
 
 ChunkSparsityPattern::DeclException2 (ExcInvalidArraySize, int, int,<< "The array has size "<< arg1<< " but should have size "<< arg2)
 
 ConstraintMatrix::DeclException0 (ExcMatrixIsClosed)
 
 ConstraintMatrix::DeclException0 (ExcMatrixNotClosed)
 
 ConstraintMatrix::DeclException1 (ExcLineInexistant, size_type,<< "The specified line "<< arg1<< " does not exist.")
 
 ConstraintMatrix::DeclException4 (ExcEntryAlreadyExists, size_type, size_type, double, double,<< "The entry for the indices "<< arg1<< " and "<< arg2<< " already exists, but the values "<< arg3<< " (old) and "<< arg4<< " (new) differ "<< "by "<< (arg4-arg3)<< ".")
 
 ConstraintMatrix::DeclException2 (ExcDoFConstrainedToConstrainedDoF, int, int,<< "You tried to constrain DoF "<< arg1<< " to DoF "<< arg2<< ", but that one is also constrained. This is not allowed!")
 
 ConstraintMatrix::DeclException1 (ExcDoFIsConstrainedFromBothObjects, size_type,<< "Degree of freedom "<< arg1<< " is constrained from both object in a merge operation.")
 
 ConstraintMatrix::DeclException1 (ExcDoFIsConstrainedToConstrainedDoF, size_type,<< "In the given argument a degree of freedom is constrained "<< "to another DoF with number "<< arg1<< ", which however is constrained by this object. This is not"<< " allowed.")
 
 ConstraintMatrix::DeclException1 (ExcRowNotStoredHere, size_type,<< "The index set given to this constraint matrix indicates "<< "constraints for degree of freedom "<< arg1<< " should not be stored by this object, but a constraint "<< "is being added.")
 
 ConstraintMatrix::DeclException2 (ExcColumnNotStoredHere, size_type, size_type,<< "The index set given to this constraint matrix indicates "<< "constraints using degree of freedom "<< arg2<< " should not be stored by this object, but a constraint "<< "for degree of freedom "<< arg1<<" uses it.")
 
 ConstraintMatrix::DeclException2 (ExcIncorrectConstraint, int, int,<< "While distributing the constraint for DoF "<< arg1<< ", it turns out that one of the processors "<< "who own the "<< arg2<< " degrees of freedom that x_"<< arg1<< " is constrained against does not know about "<< "the constraint on x_"<< arg1<< ". Did you not initialize the ConstraintMatrix "<< "with the appropriate locally_relevant set so "<< "that every processor who owns a DoF that constrains "<< "another DoF also knows about this constraint?")
 
 LACExceptions::DeclException0 (ExcNotQuadratic)
 
 LACExceptions::DeclException0 (ExcSingular)
 
 LACExceptions::DeclException0 (ExcDifferentBlockIndices)
 
 LACExceptions::DeclException1 (ExcPETScError, int,<< "An error with error number "<< arg1<< " occurred while calling a PETSc function")
 
 LACExceptions::DeclException1 (ExcTrilinosError, int,<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function")
 
 FullMatrix< number >::DeclException0 (ExcEmptyMatrix)
 
 FullMatrix< number >::DeclException1 (ExcNotRegular, number,<< "The maximal pivot is "<< arg1<< ", which is below the threshold. The matrix may be singular.")
 
 FullMatrix< number >::DeclException3 (ExcInvalidDestination, size_type, size_type, size_type,<< "Target region not in matrix: size in this direction="<< arg1<< ", size of new matrix="<< arg2<< ", offset="<< arg3)
 
 FullMatrix< number >::DeclException0 (ExcSourceEqualsDestination)
 
 FullMatrix< number >::DeclException0 (ExcMatrixNotPositiveDefinite)
 
 parallel::distributed::BlockVector< Number >::DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize)
 
 PETScWrappers::BlockSparseMatrix::DeclException4 (ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.")
 
 PETScWrappers::BlockSparseMatrix::DeclException4 (ExcIncompatibleColNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing column numbers.")
 
 PETScWrappers::BlockVector::DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize)
 
 PETScWrappers::MPI::SparseMatrix::DeclException2 (ExcLocalRowsTooLarge, int, int,<< "The number of local rows "<< arg1<< " must be larger than the total number of rows "<< arg2)
 
 PreconditionBlock< MatrixType, inverse_type >::DeclException2 (ExcWrongBlockSize, int, int,<< "The blocksize "<< arg1<< " and the size of the matrix "<< arg2<< " do not match.")
 
 PreconditionBlock< MatrixType, inverse_type >::DeclException0 (ExcInverseMatricesAlreadyExist)
 
 PreconditionSelector< MatrixType, VectorType >::DeclException0 (ExcNoMatrixGivenToUse)
 
 SolverMinRes< VectorType >::DeclException0 (ExcPreconditionerNotDefinite)
 
 SparseLUDecomposition< number >::DeclException1 (ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
 
 SparseILU< number >::DeclException1 (ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
 
 SparseILU< number >::DeclException1 (ExcZeroPivot, size_type,<< "While computing the ILU decomposition, the algorithm ""found a zero pivot on the diagonal of row "<< arg1<< ". This must stop the ILU algorithm because it means ""that the matrix for which you try to compute a ""decomposition is singular.")
 
 SparseMatrix< number >::DeclException2 (ExcInvalidIndex, int, int,<< "You are trying to access the matrix entry with index <"<< arg1<< ','<< arg2<< ">, but this entry does not exist in the sparsity pattern ""of this matrix.""\n\n""The most common cause for this problem is that you used ""a method to build the sparsity pattern that did not ""(completely) take into account all of the entries you ""will later try to write into. An example would be ""building a sparsity pattern that does not include ""the entries you will write into due to constraints ""on degrees of freedom such as hanging nodes or periodic ""boundary conditions. In such cases, building the ""sparsity pattern will succeed, but you will get errors ""such as the current one at one point or other when ""trying to write into the entries of the matrix.")
 
 SparseMatrix< number >::DeclExceptionMsg (ExcDifferentSparsityPatterns,"When copying one sparse matrix into another, ""or when adding one sparse matrix to another, ""both matrices need to refer to the same ""sparsity pattern.")
 
 SparseMatrix< number >::DeclException2 (ExcIteratorRange, int, int,<< "The iterators denote a range of "<< arg1<< " elements, but the given number of rows was "<< arg2)
 
 SparseMatrix< number >::DeclException0 (ExcSourceEqualsDestination)
 
 SparseMatrixEZ< number >::DeclException0 (ExcNoDiagonal)
 
 SparseMatrixEZ< number >::DeclException2 (ExcInvalidEntry, int, int,<< "The entry with index ("<< arg1<< ','<< arg2<< ") does not exist.")
 
 SparseMIC< number >::DeclException0 (ExcStrengthenDiagonalTooSmall)
 
 SparseMIC< number >::DeclException1 (ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
 
 SparseMIC< number >::DeclException2 (ExcDecompositionNotStable, int, double,<< "The diagonal element ("<< arg1<<","<< arg1<<") is "<< arg2<<", but must be positive")
 
 SparsityPattern::DeclException2 (ExcNotEnoughSpace, int, int,<< "Upon entering a new entry to row "<< arg1<< ": there was no free entry any more. "<< std::endl<< "(Maximum number of entries for this row: "<< arg2<< "; maybe the matrix is already compressed?)")
 
 SparsityPattern::DeclException0 (ExcNotCompressed)
 
 SparsityPattern::DeclException0 (ExcMatrixIsCompressed)
 
 SparsityPattern::DeclException0 (ExcInvalidConstructorCall)
 
 SparsityPattern::DeclException0 (ExcDiagonalNotOptimized)
 
 SparsityPattern::DeclException2 (ExcIteratorRange, int, int,<< "The iterators denote a range of "<< arg1<< " elements, but the given number of rows was "<< arg2)
 
 SparsityPattern::DeclException1 (ExcInvalidNumberOfPartitions, int,<< "The number of partitions you gave is "<< arg1<< ", but must be greater than zero.")
 
 SwappableVector< number >::DeclException0 (ExcSizeZero)
 
 SwappableVector< number >::DeclException0 (ExcSizeNonzero)
 
 SwappableVector< number >::DeclException1 (ExcInvalidFilename, std::string,<< "The filename <"<< arg1<< "> is not a valid one here.")
 
 SwappableVector< number >::DeclException0 (ExcInvalidCopyOperation)
 
 TrilinosWrappers::BlockSparseMatrix::DeclException4 (ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.")
 
 TrilinosWrappers::BlockSparseMatrix::DeclException4 (ExcIncompatibleColNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing column numbers.")
 
 TrilinosWrappers::SparseMatrix::DeclException1 (ExcTrilinosError, int,<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function")
 
 TrilinosWrappers::SparseMatrix::DeclException2 (ExcInvalidIndex, size_type, size_type,<< "The entry with index <"<< arg1<< ','<< arg2<< "> does not exist.")
 
 TrilinosWrappers::SparseMatrix::DeclException0 (ExcSourceEqualsDestination)
 
 TrilinosWrappers::SparseMatrix::DeclException0 (ExcMatrixNotCompressed)
 
 TrilinosWrappers::SparseMatrix::DeclException4 (ExcAccessToNonLocalElement, size_type, size_type, size_type, size_type,<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a distributed matrix, but only rows "<< arg3<< " through "<< arg4<< " are stored locally and can be accessed.")
 
 TrilinosWrappers::SparseMatrix::DeclException2 (ExcAccessToNonPresentElement, size_type, size_type,<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a sparse matrix, but it appears to not"<< " exist in the Trilinos sparsity pattern.")
 
 TrilinosWrappers::SparsityPattern::DeclException1 (ExcTrilinosError, int,<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function")
 
 TrilinosWrappers::SparsityPattern::DeclException2 (ExcInvalidIndex, size_type, size_type,<< "The entry with index <"<< arg1<< ','<< arg2<< "> does not exist.")
 
 TrilinosWrappers::SparsityPattern::DeclException0 (ExcSourceEqualsDestination)
 
 TrilinosWrappers::SparsityPattern::DeclException4 (ExcAccessToNonLocalElement, size_type, size_type, size_type, size_type,<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a distributed matrix, but only rows "<< arg3<< " through "<< arg4<< " are stored locally and can be accessed.")
 
 TrilinosWrappers::SparsityPattern::DeclException2 (ExcAccessToNonPresentElement, size_type, size_type,<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a sparse matrix, but it appears to not"<< " exist in the Trilinos sparsity pattern.")
 
 VectorMemory< VectorType >::DeclException0 (ExcNoMoreVectors)
 
 VectorMemory< VectorType >::DeclException0 (ExcNotAllocatedHere)
 
 MeshWorker::LocalIntegrator< dim, spacedim, number >::DeclException0 (ExcPureFunction)
 
 internal::Triangulation::DeclException1 (ExcGridHasInvalidCell, int,<< "Something went wrong when making cell "<< arg1<< ". Read the docs and the source code "<< "for more information.")
 
 internal::Triangulation::DeclException1 (ExcInternalErrorOnCell, int,<< "Something went wrong upon construction of cell "<< arg1)
 
 internal::Triangulation::DeclException1 (ExcCellHasNegativeMeasure, int,<< "Cell "<< arg1<< " has negative measure. This typically "<< "indicates some distortion in the cell, or a mistakenly "<< "swapped pair of vertices in the input to "<< "Triangulation::create_triangulation().")
 
 internal::Triangulation::DeclException3 (ExcInvalidVertexIndex, int, int, int,<< "Error while creating cell "<< arg1<< ": the vertex index "<< arg2<< " must be between 0 and "<< arg3<< ".")
 
 internal::Triangulation::DeclException2 (ExcLineInexistant, int, int,<< "While trying to assign a boundary indicator to a line: "<< "the line with end vertices "<< arg1<< " and "<< arg2<< " does not exist.")
 
 internal::Triangulation::DeclException4 (ExcQuadInexistant, int, int, int, int,<< "While trying to assign a boundary indicator to a quad: "<< "the quad with bounding lines "<< arg1<< ", "<< arg2<< ", "<< arg3<< ", "<< arg4<< " does not exist.")
 
 internal::Triangulation::DeclException3 (ExcInteriorLineCantBeBoundary, int, int, types::boundary_id,<< "The input data for creating a triangulation contained "<< "information about a line with indices "<< arg1<< " and "<< arg2<< " that is described to have boundary indicator "<< (int) arg3<< ". However, this is an internal line not located on the "<< "boundary. You cannot assign a boundary indicator to it."<< std::endl<< std::endl<< "If this happened at a place where you call "<< "Triangulation::create_triangulation() yourself, you need "<< "to check the SubCellData object you pass to this function."<< std::endl<< std::endl<< "If this happened in a place where you are reading a mesh "<< "from a file, then you need to investigate why such a line "<< "ended up in the input file. A typical case is a geometry "<< "that consisted of multiple parts and for which the mesh "<< "generator program assumes that the interface between "<< "two parts is a boundary when that isn't supposed to be "<< "the case, or where the mesh generator simply assigns "<< "'geometry indicators' to lines at the perimeter of "<< "a part that are not supposed to be interpreted as "<< "'boundary indicators'.")
 
 internal::Triangulation::DeclException5 (ExcInteriorQuadCantBeBoundary, int, int, int, int, types::boundary_id,<< "The input data for creating a triangulation contained "<< "information about a quad with indices "<< arg1<< ", "<< arg2<< ", "<< arg3<< ", and "<< arg4<< " that is described to have boundary indicator "<< (int) arg5<< ". However, this is an internal quad not located on the "<< "boundary. You cannot assign a boundary indicator to it."<< std::endl<< std::endl<< "If this happened at a place where you call "<< "Triangulation::create_triangulation() yourself, you need "<< "to check the SubCellData object you pass to this function."<< std::endl<< std::endl<< "If this happened in a place where you are reading a mesh "<< "from a file, then you need to investigate why such a quad "<< "ended up in the input file. A typical case is a geometry "<< "that consisted of multiple parts and for which the mesh "<< "generator program assumes that the interface between "<< "two parts is a boundary when that isn't supposed to be "<< "the case, or where the mesh generator simply assigns "<< "'geometry indicators' to quads at the surface of "<< "a part that are not supposed to be interpreted as "<< "'boundary indicators'.")
 
 internal::Triangulation::DeclException2 (ExcMultiplySetLineInfoOfLine, int, int,<< "In SubCellData the line info of the line with vertex indices "<< arg1<< " and "<< arg2<< " appears more than once. "<< "This is not allowed.")
 

Cell iterator functions returning ranges of iterators

 DoFHandler< dim, spacedim >::DeclException0 (ExcRenumberingIncomplete)
 
 DoFHandler< dim, spacedim >::DeclException0 (ExcGridsDoNotMatch)
 
 DoFHandler< dim, spacedim >::DeclException0 (ExcInvalidBoundaryIndicator)
 
 DoFHandler< dim, spacedim >::DeclException1 (ExcNewNumbersNotConsecutive, types::global_dof_index,<< "The given list of new dof indices is not consecutive: "<< "the index "<< arg1<< " does not exist.")
 
 DoFHandler< dim, spacedim >::DeclException1 (ExcInvalidLevel, int,<< "The given level "<< arg1<< " is not in the valid range!")
 
 DoFHandler< dim, spacedim >::DeclException0 (ExcFacesHaveNoLevel)
 
 DoFHandler< dim, spacedim >::DeclException1 (ExcEmptyLevel, int,<< "You tried to do something on level "<< arg1<< ", but this level is empty.")
 

Exceptions

 Mapping< dim, spacedim >::DeclExceptionMsg (ExcTransformationFailed,"Computing the mapping between a real space point and a point in reference ""space failed, typically because the given point lies outside the cell ""where the inverse mapping is not unique.")
 
 Mapping< dim, spacedim >::DeclException3 (ExcDistortedMappedCell, Point< spacedim >, double, int,<< "The image of the mapping applied to cell with center ["<< arg1<< "] is distorted. The cell geometry or the "<< "mapping are invalid, giving a non-positive volume "<< "fraction of "<< arg2<< " in quadrature point "<< arg3<< ".")
 

Exceptions

 Triangulation< dim, spacedim >::DeclException1 (ExcInvalidLevel, int,<< "The given level "<< arg1<< " is not in the valid range!")
 
 Triangulation< dim, spacedim >::DeclException2 (ExcTriangulationNotEmpty, int, int,<< "You are trying to perform an operation on a triangulation "<< "that is only allowed if the triangulation is currently empty. "<< "However, it currently stores "<< arg1<< " vertices and has "<< "cells on "<< arg2<< " levels.")
 
 Triangulation< dim, spacedim >::DeclException0 (ExcGridReadError)
 
 Triangulation< dim, spacedim >::DeclException0 (ExcFacesHaveNoLevel)
 
 Triangulation< dim, spacedim >::DeclException1 (ExcEmptyLevel, int,<< "You tried to do something on level "<< arg1<< ", but this level is empty.")
 
 Triangulation< dim, spacedim >::DeclException0 (ExcNonOrientableTriangulation)
 
 Triangulation< dim, spacedim >::DeclException1 (ExcBoundaryIdNotFound, types::boundary_id,<< "The given boundary_id "<< arg1<< " is not defined in this Triangulation!")
 

Detailed Description

This module contains classes that are used in the exception mechanism of deal.II.

Brief overview

Exceptions are used in two different ways:

Detailed description

The error handling mechanism in deal.II is generally used in two ways. The first uses error checking in debug mode only and is useful for programs which are not fully tested. When the program shows no errors anymore, one may switch off error handling and get better performance by this, since checks for errors are done quite frequently in the library (a typical speed up is a factor of four!). This mode of exception generation is most useful for internal consistency checks such as range checking or checking of the validity of function arguments. Errors of this kind usually are programming errors and the program should abort with as detailed a message as possible, including location and reason for the generation of the exception.

The second mode is for error checks which should always be on, such as for I/O errors, failing memory requests and the like. It does not make much sense to turn this mode off, since this kind of errors may happen in tested and untested programs likewise. Exceptions of this kind do not terminate the program, rather they throw exceptions in the C++ manner, allowing the program to catch them and eventually do something about it. As it may be useful to have some information printed out if an exception could not be handled properly, additional information is passed along as for the first mode. The latter makes it necessary to provide a family of macros which enter this additional information into the exception class; this could in principle be done by the programmer himself each time by hand, but since the information can be obtained automatically, a macro is provided for this.

Both modes use exception classes, which need to have special features in additional to the C++ standard's std::exception class. Such a class is declared by the following lines of code:

DeclException2 (ExcDomain, int, int,
<< "Index= " << arg1 << "Upper Bound= " << arg2);

This declares an exception class named ExcDomain, which has two variables as additional information (named arg1 and arg2 by default) and which outputs the given sequence (which is appended to an std::ostream variable's name, thus the weird syntax). There are other DeclExceptionN macros for exception classes with more or no parameters. By convention, the name of all exception classes starts with Exc... and most of them are declared locally to the class it is to be used in (a few very frequently found ones are also declared in the StandardExceptions namespace and are available everywhere). Declaring exceptions globally is possible but pollutes the global namespace, is less readable and most of the time unnecessary.

Since exception classes are declared the same way for both modes of error checking, it is possible to use an exception declared through the DeclExceptionN(...) macro family for both static as well as dynamic checks.

Use of the debug mode exceptions (static checks)

To use the exception mechanism for debug mode error checking, write lines like the following in your source code:

Assert (n<dim, ExcDomain(n,dim));

which by macro expansion does essentially the following:

#ifdef DEBUG
if (!(cond))
issue error of class ExcDomain(n,dim)
#else
do nothing
#endif

i.e. it issues an error only if the preprocessor variable DEBUG is set and if the given condition (in this case n < dim is violated).

If the exception was declared using the DeclException0 (...) macro, i.e. without any additional parameters, its name has nonetheless to be given with parentheses: Assert (i>m, ExcSomewhat());

How it works internally

If the DEBUG preprocessor directive is set, the call Assert (cond, exc); is basically converted by the preprocessor into the following sequence:

if (!(cond))
deal_II_exceptions::internals::issue_error_assert_1
(__FILE__,
__LINE__,
__PRETTY_FUNCTION__,
#cond,
#exc,
&exc);

(Note that function names and exact calling sequences may change over time, but the general principle remains the same.) I.e., if the given condition is violated, then the file and line in which the exception occurred as well as the condition itself and the call sequence of the exception object is passed to the deal_II_exceptions::internals::issue_error_assert_1() function. Additionally an object of the form given by exc is created (this is normally an unnamed object like in ExcDomain (n, dim) of class ExcDomain) and transferred to this function.

__PRETTY__FUNCTION__ is a macro defined by some compilers and gives the name of the function. If another compiler is used, we try to set this function to something reasonable, if the compiler provides us with that, and "(not available)" otherwise.

In issue_error_assert, the given data is transferred into the exc object by calling the set_fields() function; after that, the general error info is printed onto std::cerr using the PrintError() function of exc and finally the exception specific data is printed using the user defined function PrintError() (which is normally created using the DeclException (...) macro family. If it can be obtained from the operating system, the output may also contain a stacktrace to show where the error happened. Several of the Tutorial programs programs show a typical output.

After printing all this information, deal_II_exceptions::internals::abort() is called (with one exception, see the end of this section). This terminates the program, which is the right thing to do for this kind of error checking since it is used to detect programming errors rather than run-time errors; a program can, by definition, not recover from programming errors.

If the preprocessor variable DEBUG is not set, then nothing happens, i.e. the Assert macro is expanded to {}.

Sometimes, there is no useful condition for an exception other than that the program flow should not have reached a certain point, e.g. a default section of a switch statement. In this case, raise the exception by the following construct:

Assert (false, ExcInternalError());

See the step-7 and several other of the tutorial programs for a use of this construct.

As mentioned above, the program is terminated once a call to Assert fails. However, there is one case where we do not want to do this, namely when a C++ exception is active. The usual case where this happens is that someone throws an exception through the AssertThrow mechanism (see below) which, while the stack is unwound, leads to the destruction of other objects in stack frames above. If other objects refer to the objects being thus destroyed, some destructors raise an exception through Assert. If we would abort the program then, we would only ever see the message that an object is being destroyed which is still referenced from somewhere, but we would never see the original exception that triggered this. (You can see it in the debugger by putting a break point on the function __throw, but you cannot see it from the program itself.) In that case, we use a C++ standard library function to detect the presence of another active exception and do not terminate the program to allow that the thrown exception propagates to some place where its message can be displayed.

Since it is common that one failed assertion leads to a whole chain of others, we only ever print the very first message. If the program is then aborted, that is no problem. If it is not (since a C++ exception is active), only the first is displayed and a message about suppressed follow-up messages is shown.

Use of run-time exceptions

For this mode, the standard C++ throw and catch concept exists. We want to keep to this, but want to extend it a bit. In general, the structure is the same, i.e. you normally raise and exception by

if (!(cond))
throw ExcSomething();

and catch it using the statement

try {
do_something ();
}
catch (exception &e) {
std::cerr << "Exception occurred:" << std::endl
<< e.what ()
<< std::endl;
do_something_to_reciver ();
};

exception is a standard C++ class providing basic functionality for exceptions, such as the virtual function what() which returns some information on the exception itself. This information is useful if an exception can't be handled properly, in which case as precise a description as possible should be printed.

The problem here is that to get significant and useful information out of what(), it is necessary to overload this function in out exception class and call the throw operator with additional arguments to the exception class. The first thing, overloading the what function is done using the DeclExceptionN macros, but putting the right information, which is the same as explained above for the Assert expansion, requires some work if one would want to write it down each time:

if (!(cond))
{
ExcSomething e(additional information);
e.set_fields (__FILE__, __LINE__, __PRETTY_FUNCTION__,
"condition as a string",
"name of condition as a string");
throw e;
};

For this purpose, the macro AssertThrow was invented. It does mainly the same job as does the Assert macro, but it does not kill the program, it rather throws an exception as shown above. The mode of usage is

AssertThrow (cond, ExcSomething(additional information));

The condition to be checked is incorporated into the macro in order to allow passing the violated condition as a string. The expansion of the AssertThrow macro is not affected by the DEBUG preprocessor variable.

Description of the DeclExceptionN macro family

There is a whole family of DeclExceptionX macros where X is to be replaced by the number of additional parameters (0 to 5 presently). These macros are used to declare exception classes in the following way:

DeclException2 (ExcDomain,
int,
int,
<< " i=" << arg1 << ", m=" << arg2);

The first argument denotes the name of the exception class to be created. The next arguments are the types of the parameters (in this case there two types, corresponding to the X in DeclExceptionX) and finally the output sequence with which you can print additional information.

The syntax of the output sequence is a bit weird but gets clearer once you see how this macro is defined (again schematically, actual function names and definitions may change over time and be different):

class name : public ExceptionBase {
public:
name (const type1 a1, const type2 a2) :
arg1 (a1), arg2(a2) {};
virtual void print_info (std::ostream &out) const {
out outsequence << std::endl;
};
private:
type1 arg1;
type2 arg2;
};

If declared as specified, you can later use this exception class in the following manner:

int i=5;
int m=3;
Assert (i<m, MyExc2(i,m));

and the output if the condition fails will be

--------------------------------------------------------
An error occurred in line <301> of file <exc-test.cc>.
The violated condition was:
i<m
The name and call sequence of the exception was:
MyExc2(i,m)
Additional Information:
i=5, m=3
--------------------------------------------------------

Obviously for the DeclException0(name) macro, no types and also no output sequence is allowed.

Author
Wolfgang Bangerth, 1998-2006

Macro Definition Documentation

#define Assert (   cond,
  exc 
)
Value:
{ \
if (!(cond)) \
::deal_II_exceptions::internals:: \
issue_error(::deal_II_exceptions::internals::abort_on_exception,\
__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
}

This is the main routine in the exception mechanism for debug mode error checking. It asserts that a certain condition is fulfilled, otherwise issues an error and aborts the program.

See the ExceptionBase class for more information.

Note
Active in DEBUG mode only
Author
Wolfgang Bangerth, 1997, 1998, Matthias Maier, 2013

Definition at line 294 of file exceptions.h.

#define AssertNothrow (   cond,
  exc 
)
Value:
{ \
if (!(cond)) \
::deal_II_exceptions::internals:: \
issue_error( \
::deal_II_exceptions::internals::abort_nothrow_on_exception, \
__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
}

A variant of the Assert macro above that exhibits the same runtime behaviour as long as disable_abort_on_exception was not called.

However, if disable_abort_on_exception was called, this macro merely prints the exception that would be thrown to deallog and continues normally without throwing an exception.

See the ExceptionBase class for more information.

Note
Active in DEBUG mode only
Author
Wolfgang Bangerth, 1997, 1998, Matthias Maier, 2013

Definition at line 323 of file exceptions.h.

#define AssertThrow (   cond,
  exc 
)
Value:
{ \
if (!(cond)) \
::deal_II_exceptions::internals:: \
issue_error(::deal_II_exceptions::internals::throw_on_exception,\
__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
}

This is the main routine in the exception mechanism for run-time mode error checking. It assert that a certain condition is fulfilled, otherwise issues an error and aborts the program.

See the ExceptionBase class for more information.

Note
Active in both DEBUG and RELEASE modes
Author
Wolfgang Bangerth, 1997, 1998, Matthias Maier, 2013

Definition at line 358 of file exceptions.h.

#define DeclException0 (   Exception0)    static ::ExceptionBase& Exception0 ()

Declare an exception class derived from ExceptionBase without parameters.

Author
Wolfgang Bangerth, November 1997

Definition at line 522 of file exceptions.h.

#define DeclExceptionMsg (   Exception,
  defaulttext 
)    static ::ExceptionBase& Exception ()

Declare an exception class derived from ExceptionBase that can take one runtime argument, but if none is given in the place where you want to throw the exception, it simply reverts to the default text provided when declaring the exception class through this macro.

Definition at line 533 of file exceptions.h.

#define DeclException1 (   Exception1,
  type1,
  outsequence 
)    static ::ExceptionBase& Exception1 (type1 arg1) throw (errortext outsequence)

Declare an exception class derived from ExceptionBase with one additional parameter.

Definition at line 542 of file exceptions.h.

#define DeclException2 (   Exception2,
  type1,
  type2,
  outsequence 
)    static ::ExceptionBase& Exception2 (type1 arg1, type2 arg2) throw (errortext outsequence)

Declare an exception class derived from ExceptionBase with two additional parameters.

Definition at line 552 of file exceptions.h.

#define DeclException3 (   Exception3,
  type1,
  type2,
  type3,
  outsequence 
)    static ::ExceptionBase& Exception3 (type1 arg1, type2 arg2, type3 arg3) throw (errortext outsequence)

Declare an exception class derived from ExceptionBase with three additional parameters.

Definition at line 562 of file exceptions.h.

#define DeclException4 (   Exception4,
  type1,
  type2,
  type3,
  type4,
  outsequence 
)    static ::ExceptionBase& Exception4 (type1 arg1, type2 arg2, type3 arg3, type4 arg4) throw (errortext outsequence)

Declare an exception class derived from ExceptionBase with four additional parameters.

Definition at line 572 of file exceptions.h.

#define DeclException5 (   Exception5,
  type1,
  type2,
  type3,
  type4,
  type5,
  outsequence 
)    static ::ExceptionBase& Exception5 (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) throw (errortext outsequence)

Declare an exception class derived from ExceptionBase with five additional parameters.

Definition at line 582 of file exceptions.h.

#define AssertDimension (   dim1,
  dim2 
)
Value:
Assert((dim1) == (dim2), \
::ExcDimensionMismatch((dim1),(dim2)))
#define Assert(cond, exc)
Definition: exceptions.h:294

Special assertion for dimension mismatch.

Since this is used very often and always repeats the arguments, we introduce this special assertion for ExcDimensionMismatch in order to keep the user codes shorter.

Author
Guido Kanschat 2007

Definition at line 1052 of file exceptions.h.

#define AssertVectorVectorDimension (   vec,
  dim1,
  dim2 
)
Value:
AssertDimension((vec).size(), (dim1)) \
for (unsigned int i=0;i<dim1;++i) { AssertDimension((vec)[i].size(), (dim2)); }
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1052

Special assertion, testing whether vec has size dim1, and each entry of the vector has the size dim2

Author
Guido Kanschat 2010

Definition at line 1063 of file exceptions.h.

#define AssertIndexRange (   index,
  range 
)
Value:
Assert((index) < (range), \
::ExcIndexRange((index),0,(range)))
#define Assert(cond, exc)
Definition: exceptions.h:294

Special assertion for index range of nonnegative indices.

Since this is used very often and always repeats the arguments, we introduce this special assertion for ExcIndexRange in order to keep the user codes shorter.

Called wit arguments index and range it asserts that index<range and throws ExcIndexRange(index,0,range) if it fails.

Author
Guido Kanschat 2007

Definition at line 1081 of file exceptions.h.

#define AssertIsFinite (   number)
Value:
ExcNumberNotFinite(std::complex<double>(number)))
bool is_finite(const double x)
Definition: numbers.h:255
#define Assert(cond, exc)
Definition: exceptions.h:294
::ExceptionBase & ExcNumberNotFinite(std::complex< double > arg1)

An assertion that checks whether a number is finite or not. We explicitly cast the number to std::complex to match the signature of the exception (see there for an explanation of why we use std::complex at all) and to satisfy the fact that std::complex has no implicit conversions.

Author
Wolfgang Bangerth, 2015

Definition at line 1096 of file exceptions.h.

Enumeration Type Documentation

An enum describing how to treat an exception in issue_error

Definition at line 238 of file exceptions.h.

Function Documentation

ConvergenceTable::DeclException0 ( ExcWrongValueType  )

Exception

ConvergenceTable::DeclException1 ( ExcRateColumnAlreadyExists  ,
std::string   
)

Exception

template<int dim, int spacedim = dim>
DataOutBase::Patch< dim, spacedim >::DeclException2 ( ExcInvalidCombinationOfDimensions  ,
int  ,
int  ,
<< "It is not possible to have a structural dimension of "<< arg1<< " to be larger than the space dimension of the surrounding"<< " space "<<  arg2 
)

Exception

DataOutBase::DeclException2 ( ExcInvalidDatasetSize  ,
int  ,
int  ,
<< "The number of points in this data set is "<< arg1<< "  ,
but we expected"<< arg2<< "in each space direction."   
)

Exception

DataOutBase::DeclException0 ( ExcNoPatches  )

An output function did not receive any patches for writing.

DataOutBase::DeclException0 ( ExcTecplotAPIError  )

Exception

DataOutBase::DeclException1 ( ExcErrorOpeningTecplotFile  ,
char *  ,
<< "There was an error opening Tecplot file "<< arg1<< " for output"   
)

Exception

StandardExceptions::DeclExceptionMsg ( ExcDivideByZero  ,
"A piece of code is attempting a division by zero. This is ""likely going to lead to results that make no sense."   
)

Exception denoting a division by zero.

::ExceptionBase& StandardExceptions::ExcNumberNotFinite ( std::complex< double >  arg1)
throw (errortext << "In a significant number of places,
deal.II checks that some intermediate " << "value is a finite number (as opposed to plus or minus infinity,
or " << "NaN/Not a Number). In the current function,
we encountered a number " << "that is not finite (its value is " << arg1 << " and therefore " << "violates the current assertion.\n\n" << "This may be due to the fact that some operation in this function " << "created such a value,
or because one of the arguments you passed " << "to the function already had this value from some previous " << "operation. In the latter case,
this function only triggered the " << "error but may not actually be responsible for the computation of " << "the number that is not finite.\n\n" << "There are two common cases where this situation happens. First,
your " << "code (or something in deal.II) divides by zero in a place where this " << "should not happen. Or,
you are trying to solve a linear system " << "with an unsuitable solver (such as an indefinite or non-symmetric " << "linear system using a Conjugate Gradient solver); such attempts " << "oftentimes yield an operation somewhere that tries to divide " << "by zero or take the square root of a negative value.\n\n" << "In any case,
when trying to find the source of the error,
" << "recall that the location where you are getting this error is " << "simply the first place in the program where there is a check " << "that a number (e.g.,
an element of a solution vector) is in fact " << "finite,
but that the actual error that computed the number " << "may have happened far earlier. To find this location,
you " << "may want to add checks for finiteness in places of your " << "program visited before the place where this error is produced." << "One way to check for finiteness is to use the 'AssertIsFinite' " << "macro." ); DeclExceptionMsg (ExcOutOfMemory,
"Your program tried to allocate some memory but this " "allocation failed. Typically,
this either means that " "you simply do not have enough memory in your system,
" "or that you are (erroneously) trying to allocate " "a chunk of memory that is simply beyond all reasonable " "size,
for example because the size of the object has " "been computed incorrectly."); static ::ExceptionBase& ExcMemoryLeak ( int arg1) throw (errortext << "Destroying memory handler while " << arg1 << " objects are still allocated" ); DeclExceptionMsg (ExcIO,
"An input/output error has occurred. There are a number of " "reasons why this may be happening,
both for reading and " "writing operations." "\n\n" "If this happens during an operation that tries to read " "data: First,
you may be " "trying to read from a file that doesn't exist or that is " "not readable given its file permissions. Second,
deal.II " "uses this error at times if it tries to " "read information from a file but where the information " "in the file does not correspond to the expected format. " "An example would be a truncated file,
or a mesh file " "that contains not only sections that describe the " "vertices and cells,
but also sections for additional " "data that deal.II does not understand." "\n\n" "If this happens during an operation that tries to write " "data: you may be trying to write to a file to which file " "or directory permissions do not allow you to write. A " "typical example is where you specify an output file in " "a directory that does not exist."); static ::ExceptionBase& ExcFileNotOpen ( char * arg1) throw (errortext << "Could not open file " << arg1 ); DeclExceptionMsg (ExcNotImplemented,
"You are trying to use functionality in deal.II that is " "currently not implemented. In many cases,
this indicates " "that there simply didn't appear much of a need for it,
or " "that the author of the original code did not have the " "time to implement a particular case. If you hit this " "exception,
it is therefore worth the time to look into " "the code to find out whether you may be able to " "implement the missing functionality. If you do,
please " "consider providing a patch to the deal.II development " "sources (see the deal.II website on how to contribute)."); DeclExceptionMsg (ExcInternalError,
"This exception -- which is used in many places in the " "library -- usually indicates that some condition which " "the author of the code thought must be satisfied at a " "certain point in an algorithm,
is not fulfilled. An " "example would be that the first part of an algorithm " "sorts elements of an array in ascending order,
and " "a second part of the algorithm later encounters an " "an element that is not larger than the previous one." "\n\n" "There is usually not very much you can do if you " "encounter such an exception since it indicates an error " "in deal.II,
not in your own program. Try to come up with " "the smallest possible program that still demonstrates " "the error and contact the deal.II mailing lists with it " "to obtain help."); DeclExceptionMsg (ExcPureFunctionCalled,
"You (or a place in the library) are trying to call a " "function that is declared as a virtual function in a " "base class but that has not been overridden in your " "derived class." "\n\n" "This exception happens in cases where the base class " "cannot provide a useful default implementation for " "the virtual function,
but where we also do not want " "to mark the function as abstract (i.e.,
with '=0' at the end) " "because the function is not essential to the class in many " "contexts. In cases like this,
the base class provides " "a dummy implementation that makes the compiler happy,
but " "that then throws the current exception." "\n\n" "A concrete example would be the 'Function' class. It declares " "the existence of 'value()' and 'gradient()' member functions,
" "and both are marked as 'virtual'. Derived classes have to " "override these functions for the values and gradients of a " "particular function. On the other hand,
not every function " "has a gradient,
and even for those that do,
not every program " "actually needs to evaluate it. Consequently,
there is no " "*requirement* that a derived class actually override the " "'gradient()' function (as there would be had it been marked " "as abstract). But,
since the base class cannot know how to " "compute the gradient,
if a derived class does not override " "the 'gradient()' function and it is called anyway,
then the " "default implementation in the base class will simply throw " "an exception." "\n\n" "The exception you see is what happens in cases such as the " "one just illustrated. To fix the problem,
you need to " "investigate whether the function being called should indeed have " "been called; if the answer is 'yes',
then you need to " "implement the missing override in your class."); static ::ExceptionBase& ExcInvalidConstructorCall (); static ::ExceptionBase& ExcNotInitialized (); static ::ExceptionBase& ExcInvalidState (); static ::ExceptionBase& ExcImpossibleInDim ( int arg1) throw (errortext << "You are trying to execute functionality that is " << "impossible in " << arg1 << "d or simply does not make any sense." ); DeclExceptionMsg(ExcZero,
"In a check in the code,
deal.II encountered a zero in " "a place where this does not make sense. See the condition " "that was being checked and that is printed further up " "in the error message to get more information on what " "the erroneous zero corresponds to."); DeclExceptionMsg(ExcEmptyObject,
"The object you are trying to access is empty but it makes " "no sense to attempt the operation you are trying on an " "empty object."); static ::ExceptionBase& ExcDimensionMismatch ( std::size_t arg1,
std::size_t arg2) throw (errortext << "Dimension " << arg1 << " not equal to " << arg2 ); static ::ExceptionBase& ExcDimensionMismatch2 ( int arg1,
int arg2,
int arg3) throw (errortext << "Dimension " << arg1 << " neither equal to " << arg2 << " nor to " << arg3 ); static ::ExceptionBase& ExcIndexRange ( int arg1,
int arg2,
int arg3) throw (errortext << "Index " << arg1 << " is not in the half-open range [" << arg2 << ",
" << arg3 << ")." << (arg2==arg3 ? " In the current case,
this half-open range is in fact empty,
" "suggesting that you are accessing an element of an empty" "collection such as a vector that has not been set to the" "correct size." : ""
)
static

Exception raised if a number is not finite.

This exception should be used to catch infinite or not a number results of arithmetic operations that do not result from a division by zero (use ExcDivideByZero for those).

The exception uses std::complex as its argument to ensure that we can use it for all scalar arguments (real or complex-valued).

template<typename T >
::ExceptionBase& StandardExceptions::ExcIndexRangeType ( arg1,
arg2,
arg3 
)
throw (errortext << "Index " << arg1 << " is not in the half-open range [" << arg2 << ",
" << arg3 << "
)
static

This exception indicates that an index is not within the expected range. For example, it may be that you are trying to access an element of a vector which does not exist.

The constructor takes three int arguments, namely

  1. the violating index
  2. the lower bound
  3. the upper bound plus one

This generic exception differs from ExcIndexRange by allowing to specify the type of indices.

::ExceptionBase& StandardExceptions::ExcLowerRange ( int  arg1,
int  arg2 
)
throw (errortext<< "Number "<< arg1<< " must be larger than or equal "<< arg2<< "
)
static

A number is too small.

template<typename T >
::ExceptionBase& StandardExceptions::ExcLowerRangeType ( arg1,
arg2 
)
throw (errortext<< "Number "<< arg1<< " must be larger than or equal "<< arg2<< "."
)
static

A generic exception definition for the ExcLowerRange above.

::ExceptionBase& StandardExceptions::ExcNotMultiple ( int  arg1,
int  arg2 
)
throw (errortext<< "Division "<< arg1<< " by "<< arg2<< " has remainder different from zero"
)
static

This exception indicates that the first argument should be an integer multiple of the second, but is not.

StandardExceptions::DeclExceptionMsg ( ExcInvalidIterator  ,
"You are trying to use an  iterator,
but the iterator is""in an invalid state.This may indicate that the iterator""object has not been  initialized,
or that it has been""moved beyond the end of the range of valid elements."   
)

This exception is thrown if the iterator you access has corrupted data. It might for instance be, that the container it refers does not have an entry at the point the iterator refers.

Typically, this will be an internal error of deal.II, because the increment and decrement operators should never yield an invalid iterator.

StandardExceptions::DeclExceptionMsg ( ExcIteratorPastEnd  ,
"You are trying to use an  iterator,
but the iterator is""pointing past the end of the range of valid elements.""It is not valid to dereference the iterator in this""case."   
)

This exception is thrown if the iterator you incremented or decremented was already at its final state.

::ExceptionBase& StandardExceptions::ExcMessage ( std::string  arg1)
throw (errortext<< arg1
)
static

This exception works around a design flaw in the DeclException0 macro: exceptions declared through DeclException0 do not allow one to specify a message that is displayed when the exception is raised, as opposed to the other exceptions which allow to show a text along with the given parameters.

When throwing this exception, you can give a message as a std::string as argument to the exception that is then displayed. The argument can, of course, be constructed at run-time, for example including the name of a file that can't be opened, or any other text you may want to assemble from different pieces.

StandardExceptions::DeclExceptionMsg ( ExcGhostsPresent  ,
"You are trying an operation on a vector that is only ""allowed if the vector has no ghost  elements,
but the""vector you are operating on does have ghost elements.""  Specifically,
vectors with ghost elements are read-only""and cannot appear in operations that write into these""vectors.""\n\n""See the glossary entry on 'Ghosted vectors'for more""information."   
)

Parallel vectors with ghost elements are read-only vectors.

StandardExceptions::DeclExceptionMsg ( ExcScalarAssignmentOnlyForZeroValue  ,
"You are trying an operation of the form '  vector = s' with ""a nonzero scalar value 's'. However,
such assignments""are only allowed if the right hand side is zero."   
)

Some of our numerical classes allow for setting all entries to zero using the assignment operator =.

In many cases, this assignment operator makes sense only for the argument zero. In other cases, this exception is thrown.

::ExceptionBase& StandardExceptions::ExcNeedsLAPACK ( )
static

This function requires support for the LAPACK library.

::ExceptionBase& StandardExceptions::ExcNeedsNetCDF ( )
static

This function requires support for the NetCDF library.

::ExceptionBase& StandardExceptions::ExcNeedsFunctionparser ( )
static

This function requires support for the FunctionParser library.

template<int dim>
FunctionDerivative< dim >::DeclException0 ( ExcInvalidFormula  )

Exception.

Patterns::List::DeclException2 ( ExcInvalidRange  ,
int  ,
int  ,
<< "The values "<< arg1<< " and "<< arg2<< " do not form a valid range."   
)

Exception.

Patterns::Map::DeclException2 ( ExcInvalidRange  ,
int  ,
int  ,
<< "The values "<< arg1<< " and "<< arg2<< " do not form a valid range."   
)

Exception.

Patterns::MultipleSelection::DeclException1 ( ExcCommasNotAllowed  ,
int  ,
<< "A comma was found at position "<< arg1<< " of your input  string,
but commas are not allowed here."   
)

Exception.

ParameterHandler::DeclException1 ( ExcEntryAlreadyExists  ,
std::string  ,
<< "The following entry already exists: "<<  arg1 
)

Exception

ParameterHandler::DeclException2 ( ExcValueDoesNotMatchPattern  ,
std::string  ,
std::string   
)

Exception

ParameterHandler::DeclException0 ( ExcAlreadyAtTopLevel  )

Exception

ParameterHandler::DeclException1 ( ExcEntryUndeclared  ,
std::string   
)

Exception

PathSearch::DeclException1 ( ExcNoClass  ,
std::string  ,
<< "The class "<< arg1<< " must be registered before referring it in PathSearch  
)

This class was not registered in the path search mechanism.

PathSearch::DeclException2 ( ExcFileNotFound  ,
std::string  ,
std::string  ,
<< "The file \""<< arg1<< "\" was not found in the path for files of class "<<  arg2 
)

The PathSearch class could not find a file with this name in its path list.

template<int dim>
QuadratureSelector< dim >::DeclException1 ( ExcInvalidQGaussOrder  ,
int  ,
<< "You tried to generate a QGauss object with an invalid "<< "number "<< arg1<< " of quadrature points in each coordinate "<< "direction. This number must be greater than or equal "<< "to 1."   
)

Exception

template<int dim>
QuadratureSelector< dim >::DeclException2 ( ExcInvalidOrder  ,
std::string  ,
unsigned  int,
<< "You tried to generate a "<< arg1<< " object; no order is needed for objects of this  kind,
but"<< arg2<< "was given as argument."   
)

Exception

template<int dim>
QuadratureSelector< dim >::DeclException1 ( ExcInvalidQuadrature  ,
std::string  ,
<< arg1<< " is not a valid name for a quadrature rule."   
)

Exception

Subscriptor::DeclException3 ( ExcInUse  ,
int  ,
char *  ,
std::string &  ,
<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\n\n"<< "(Additional information: "<< arg3<< ")\n\n"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens."   
)

Exception: Object may not be deleted, since it is used.

Subscriptor::DeclException2 ( ExcNoSubscriber  ,
char *  ,
char *   
)

A subscriber with the identification string given to Subscriptor::unsubscribe() did not subscribe to the object.

TableHandler::DeclException1 ( ExcColumnNotExistent  ,
std::string   
)

Exception

TableHandler::DeclException1 ( ExcSuperColumnNotExistent  ,
std::string   
)

Exception

TableHandler::DeclException1 ( ExcColumnOrSuperColumnNotExistent  ,
std::string   
)

Exception

TableHandler::DeclException4 ( ExcWrongNumberOfDataEntries  ,
std::string  ,
int  ,
std::string  ,
int   
)

Exception

TableHandler::DeclException1 ( ExcUndefinedTexFormat  ,
std::string   
)

Exception

Threads::DummyBarrier::DeclException1 ( ExcBarrierSizeNotUseful  ,
int  ,
<< "In single-thread  mode,
barrier sizes other than 1 are not"<< "useful.You gave"<< arg1<< "."   
)

Exception.

template<typename RT = void>
Threads::Task< RT >::DeclExceptionMsg ( ExcNoTask< RT >  ,
"The current object is not associated with a task that ""can be joined. It may have been  detached,
or you""may have already joined it in the past."   
)

Exception

template<int structdim, typename DoFHandlerType, bool level_dof_access>
DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 ( ExcInvalidObject  )

Exceptions for child classes

template<int structdim, typename DoFHandlerType, bool level_dof_access>
DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 ( ExcVectorNotEmpty  )

Exception

template<int structdim, typename DoFHandlerType, bool level_dof_access>
DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 ( ExcVectorDoesNotMatch  )

Exception

template<int structdim, typename DoFHandlerType, bool level_dof_access>
DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 ( ExcMatrixDoesNotMatch  )

Exception

template<int structdim, typename DoFHandlerType, bool level_dof_access>
DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 ( ExcNotActive  )

A function has been called for a cell which should be active, but is refined.

template<int structdim, typename DoFHandlerType, bool level_dof_access>
DoFAccessor< structdim, DoFHandlerType, level_dof_access >::DeclException0 ( ExcCantCompareIterators  )

Exception

template<template< int, int > class DoFHandlerType, int spacedim, bool level_dof_access>
DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 ( ExcInvalidObject  )

Exceptions for child classes

template<template< int, int > class DoFHandlerType, int spacedim, bool level_dof_access>
DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 ( ExcVectorNotEmpty  )

Exception

template<template< int, int > class DoFHandlerType, int spacedim, bool level_dof_access>
DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 ( ExcVectorDoesNotMatch  )

Exception

template<template< int, int > class DoFHandlerType, int spacedim, bool level_dof_access>
DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 ( ExcMatrixDoesNotMatch  )

Exception

template<template< int, int > class DoFHandlerType, int spacedim, bool level_dof_access>
DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 ( ExcNotActive  )

A function has been called for a cell which should be active, but is refined.

template<template< int, int > class DoFHandlerType, int spacedim, bool level_dof_access>
DoFAccessor< 0, DoFHandlerType< 1, spacedim >, level_dof_access >::DeclException0 ( ExcCantCompareIterators  )

Exception

template<int dim, int spacedim = dim>
DoFHandler< dim, spacedim >::DeclException0 ( ExcRenumberingIncomplete  )

We are trying to renumber the degrees of freedom, but somehow did not count correctly.

template<int dim, int spacedim = dim>
DoFHandler< dim, spacedim >::DeclException0 ( ExcGridsDoNotMatch  )

Exception

template<int dim, int spacedim = dim>
DoFHandler< dim, spacedim >::DeclException0 ( ExcInvalidBoundaryIndicator  )

Exception

template<int dim, int spacedim = dim>
DoFHandler< dim, spacedim >::DeclException1 ( ExcNewNumbersNotConsecutive  ,
types::global_dof_index  ,
<< "The given list of new dof indices is not consecutive: "<< "the index "<< arg1<< " does not exist."   
)

Exception

template<int dim, int spacedim = dim>
DoFHandler< dim, spacedim >::DeclException1 ( ExcInvalidLevel  ,
int  ,
<< "The given level "<< arg1<< " is not in the valid range!"   
)

Exception

template<int dim, int spacedim = dim>
DoFHandler< dim, spacedim >::DeclException0 ( ExcFacesHaveNoLevel  )

Exception

template<int dim, int spacedim = dim>
DoFHandler< dim, spacedim >::DeclException1 ( ExcEmptyLevel  ,
int  ,
<< "You tried to do something on level "<< arg1<< "  ,
but this level is empty."   
)

The triangulation level you accessed is empty.

DoFRenumbering::DeclException0 ( ExcRenumberingIncomplete  )

Exception

DoFRenumbering::DeclException0 ( ExcInvalidComponentOrder  )

Exception

DoFRenumbering::DeclException0 ( ExcNotDGFEM  )

The function is only implemented for Discontinuous Galerkin Finite elements.

DoFTools::DeclException0 ( ExcFiniteElementsDontMatch  )
Todo:
Write description
DoFTools::DeclException0 ( ExcGridNotCoarser  )
Todo:
Write description
DoFTools::DeclException0 ( ExcGridsDontMatch  )
Todo:
Write description

Exception

DoFTools::DeclException0 ( ExcNoFESelected  )

The DoFHandler or hp::DoFHandler was not initialized with a finite element. Please call DoFHandler::distribute_dofs() etc. first.

DoFTools::DeclException0 ( ExcInvalidBoundaryIndicator  )
Todo:
Write description
template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclException1 ( ExcShapeFunctionNotPrimitive  ,
int  ,
<< "The shape function with index "<< arg1<< " is not  primitive,
i.e.it is vector-valued and"<< "has more than one non-zero vector component.This"<< "function cannot be called for these shape functions."<< "Maybe you want to use the same function with the"<< "_component suffix?"   
)

Exception

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclException0 ( ExcFENotPrimitive  )

Exception

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclExceptionMsg ( ExcUnitShapeValuesDoNotExist  ,
"You are trying to access the values or derivatives of shape functions ""on the reference cell of an element that does not define its shape ""functions through mapping from the reference cell.  Consequently,
""you cannot ask for shape function values or derivatives on the""reference cell."   
)

Exception

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclExceptionMsg ( ExcFEHasNoSupportPoints  ,
"You are trying to access the support points of a finite ""element that either has no support points at  all,
or for""which the corresponding tables have not been implemented."   
)

Attempt to access support points of a finite element that is not Lagrangian.

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclExceptionMsg ( ExcEmbeddingVoid  ,
"You are trying to access the matrices that describe how ""to embed a finite element function on one cell into the ""finite element space on one of its children (i.e., the ""'embedding' or 'prolongation' matrices).  However,
the""current finite element can either not define this sort of""  operation,
or it has not yet been implemented."   
)

Attempt to access embedding matrices of a finite element that did not implement these matrices.

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclExceptionMsg ( ExcProjectionVoid  ,
"You are trying to access the matrices that describe how ""to restrict a finite element function from the children ""of one cell to the finite element space defined on their ""parent (i.e., the 'restriction' or 'projection' matrices). ""  However,
the current finite element can either not define""this sort of  operation,
or it has not yet been""implemented."   
)

Attempt to access restriction matrices of a finite element that did not implement these matrices.

Exception

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclException2 ( ExcWrongInterfaceMatrixSize  ,
int  ,
int  ,
<< "The interface matrix has a size of "<< arg1<< "x"<< arg2<< "  ,
which is not reasonable for the current element""in the present dimension."   
)

Exception

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclException0 ( ExcInterpolationNotImplemented  )

Exception

FETools::DeclException1 ( ExcInvalidFEName  ,
std::string  ,
<< "Can't re-generate a finite element from the string '"<< arg1<< "'."   
)

The string used for get_fe_from_name() cannot be translated to a finite element.

Either the string is badly formatted or you are using a custom element that must be added using add_fe_name() first.

FETools::DeclException2 ( ExcInvalidFEDimension  ,
char  ,
int  ,
<< "The dimension "<< arg1<< " in the finite element string must match "<< "the space dimension "<< arg2<< "."   
)

The string used for get_fe_from_name() cannot be translated to a finite element.

Dimension arguments in finite element names should be avoided. If they are there, the dimension should be dim or d. Here, you gave a numeric dimension argument, which does not match the template dimension of the finite element class.

FETools::DeclException0 ( ExcInvalidFE  )

Exception

FETools::DeclException0 ( ExcFENotPrimitive  )

The finite element must be primitive.

FETools::DeclException0 ( ExcTriangulationMismatch  )

Exception

FETools::DeclException1 ( ExcHangingNodesNotAllowed  ,
int  ,
<< "You are using continuous elements on a grid with "<< "hanging nodes but without providing hanging node "<< "constraints. Use the respective function with "<< "additional ConstraintMatrix   arguments,
instead."<<   arg1?"":"" 
)

A continuous element is used on a mesh with hanging nodes, but the constraint matrices are missing.

FETools::DeclException0 ( ExcGridNotRefinedAtLeastOnce  )

You need at least two grid levels.

FETools::DeclException4 ( ExcMatrixDimensionMismatch  ,
int  ,
int  ,
int  ,
int  ,
<< "This is a "<< arg1<< "x"<< arg2<< "  matrix,
"<< "but should be a"<< arg3<< "x"<< arg4<< "matrix."   
)

The dimensions of the matrix used did not match the expected dimensions.

FETools::DeclException1 ( ExcLeastSquaresError  ,
double  ,
<< "Least squares fit leaves a gap of "<<  arg1 
)

Exception thrown if an embedding matrix was computed inaccurately.

FETools::DeclException2 ( ExcNotGreaterThan  ,
int  ,
int  ,
<< arg1<< " must be greater than "<<  arg2 
)

Exception thrown if one variable may not be greater than another.

template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::DeclException1 ( ExcAccessToUninitializedField  ,
char *  ,
<< ("You are requesting information from an FEValues/FEFaceValues/FESubfaceValues ""object for which this kind of information has not been computed. What ""information these objects compute is determined by the update_* flags you ""pass to the constructor. Here, the operation you are attempting requires ""the <")<< arg1<< "  ,
flag to be  set,
but it was apparently not specified upon construction."   
)

This exception is thrown if FEValuesBase is asked to return the value of a field which was not required by the UpdateFlags for this FEValuesBase.

template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::DeclException0 ( ExcCannotInitializeField  )
Todo:
Document this
template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::DeclException0 ( ExcInvalidUpdateFlag  )
Todo:
Document this
template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::DeclException0 ( ExcFEDontMatch  )
Todo:
Document this
template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::DeclException1 ( ExcShapeFunctionNotPrimitive  ,
int  ,
<< "The shape function with index "<< arg1<< " is not  primitive,
i.e.it is vector-valued and"<< "has more than one non-zero vector component.This"<< "function cannot be called for these shape functions."<< "Maybe you want to use the same function with the"<< "_component suffix?"   
)
Todo:
Document this
template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::DeclException0 ( ExcFENotPrimitive  )
Todo:
Document this
template<int dim, int spacedim = dim>
FESubfaceValues< dim, spacedim >::DeclException0 ( ExcReinitCalledWithBoundaryFace  )
Todo:
Document this
template<int dim, int spacedim = dim>
FESubfaceValues< dim, spacedim >::DeclException0 ( ExcFaceHasNoSubfaces  )
Todo:
Document this
template<int dim, int spacedim = dim>
Mapping< dim, spacedim >::DeclExceptionMsg ( ExcTransformationFailed  ,
"Computing the mapping between a real space point and a point in reference ""space  failed,
typically because the given point lies outside the cell""where the inverse mapping is not unique."   
)

Computing the mapping between a real space point and a point in reference space failed, typically because the given point lies outside the cell where the inverse mapping is not unique.

template<int dim, int spacedim = dim>
Mapping< dim, spacedim >::DeclException3 ( ExcDistortedMappedCell  ,
Point< spacedim >  ,
double  ,
int  ,
<< "The image of the mapping applied to cell with center is distorted. The cell geometry or the "<< "mapping are  invalid["<< arg1<< "],
giving a non-positive volume"<< "fraction of"<< arg2<< "in quadrature point"<< arg3<< "."   
)

deal.II assumes the Jacobian determinant to be positive. When the cell geometry is distorted under the image of the mapping, the mapping becomes invalid and this exception is thrown.

template<int dim, int spacedim = dim>
Triangulation< dim, spacedim >::DeclException1 ( ExcInvalidLevel  ,
int  ,
<< "The given level "<< arg1<< " is not in the valid range!"   
)

Exception

template<int dim, int spacedim = dim>
Triangulation< dim, spacedim >::DeclException2 ( ExcTriangulationNotEmpty  ,
int  ,
int  ,
<< "You are trying to perform an operation on a triangulation "<< "that is only allowed if the triangulation is currently empty. "<< "  However,
it currently stores"<< arg1<< "vertices and has"<< "cells on"<< arg2<< "levels."   
)

The function raising this exception can only operate on an empty Triangulation, i.e., a Triangulation without grid cells.

template<int dim, int spacedim = dim>
Triangulation< dim, spacedim >::DeclException0 ( ExcGridReadError  )

Trying to re-read a grid, an error occurred.

template<int dim, int spacedim = dim>
Triangulation< dim, spacedim >::DeclException0 ( ExcFacesHaveNoLevel  )

Exception

template<int dim, int spacedim = dim>
Triangulation< dim, spacedim >::DeclException1 ( ExcEmptyLevel  ,
int  ,
<< "You tried to do something on level "<< arg1<< "  ,
but this level is empty."   
)

The triangulation level you accessed is empty.

template<int dim, int spacedim = dim>
Triangulation< dim, spacedim >::DeclException0 ( ExcNonOrientableTriangulation< dim, spacedim >  )

Exception

template<int dim, int spacedim = dim>
Triangulation< dim, spacedim >::DeclException1 ( ExcBoundaryIdNotFound  ,
types::boundary_id  ,
<< "The given boundary_id "<< arg1<< " is not defined in this Triangulation< dim, spacedim >!"   
)

Exception

Requested boundary_id not found

TriaAccessorExceptions::DeclException0 ( ExcCellNotActive  )

The cell is not an active cell, but it already has children. Some operations, like setting refinement flags or accessing degrees of freedom are only possible on active cells.

TriaAccessorExceptions::DeclException0 ( ExcCellHasNoChildren  )

Trying to access the children of a cell which is in fact active.

TriaAccessorExceptions::DeclException0 ( ExcCellHasNoParent  )

Trying to access the parent of a cell which is in the coarsest level of the triangulation.

TriaAccessorExceptions::DeclException0 ( ExcFacesHaveNoLevel  )

You are trying to access the level of a face, but faces have no inherent level. The level of a face can only be determined by the level of an adjacent face, which in turn implies that a face can have several levels.

template<typename G>
internal::Triangulation::TriaObjects< G >::DeclException2 ( ExcMemoryInexact  ,
int  ,
int  ,
<< "The containers have sizes "<< arg1<< " and "<< arg2<< "  ,
which is not as expected."   
)

Exception

template<typename G>
internal::Triangulation::TriaObjects< G >::DeclException0 ( ExcPointerIndexClash  )

Triangulation objects can either access a user pointer or a user index. What you tried to do is trying to access one of those after using the other.

template<typename number = double, typename BlockVectorType = BlockVector<number>>
BlockTrianglePrecondition< number, BlockVectorType >::DeclException1 ( ExcNoDiagonal  ,
size_type  ,
<< "No diagonal entry was added for block "<<  arg1 
)

Each diagonal block must contain one and only one matrix. If this exception is thrown, you did not enter a matrix here.

template<typename number = double, typename BlockVectorType = BlockVector<number>>
BlockTrianglePrecondition< number, BlockVectorType >::DeclException1 ( ExcMultipleDiagonal  ,
size_type  ,
<< "Inverse diagonal entries may not be added in block "<<  arg1 
)

Each diagonal block must contain one and only one matrix. If this exception is thrown, you entered a second matrix here.

template<typename MatrixType>
BlockMatrixBase< MatrixType >::DeclException4 ( ExcIncompatibleRowNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing row numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

template<typename MatrixType>
BlockMatrixBase< MatrixType >::DeclException4 ( ExcIncompatibleColNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing column numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

template<typename number>
BlockSparseMatrix< number >::DeclException0 ( ExcBlockDimensionMismatch  )

Exception

template<typename SparsityPatternType>
BlockSparsityPatternBase< SparsityPatternType >::DeclException4 ( ExcIncompatibleRowNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing row numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

template<typename SparsityPatternType>
BlockSparsityPatternBase< SparsityPatternType >::DeclException4 ( ExcIncompatibleColNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing column numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

template<typename SparsityPatternType>
BlockSparsityPatternBase< SparsityPatternType >::DeclException0 ( ExcInvalidConstructorCall  )

Exception

template<typename Number>
BlockVector< Number >::DeclException0 ( ExcIteratorRangeDoesNotMatchVectorSize  )

Exception

template<class BlockVectorType, bool Constness>
internal::BlockVectorIterators::Iterator< BlockVectorType, Constness >::DeclExceptionMsg ( ExcPointerToDifferentVectors  ,
"Your program tried to compare iterators pointing to ""different block vectors. There is no reasonable way ""to do this."   
)

Exception thrown when one performs arithmetical comparisons on iterators belonging to two different block vectors.

template<class BlockVectorType, bool Constness>
internal::BlockVectorIterators::Iterator< BlockVectorType, Constness >::DeclExceptionMsg ( ExcCastingAwayConstness  ,
"Constructing a non-const iterator from a const ""iterator does not make sense."   
)

Exception thrown when one attempts to copy construct a non-const iterator from a const iterator.

Note
when deal.II is compiled with C++11 support this check is instead performed at compile time via static_assert.
template<typename number>
ChunkSparseMatrix< number >::DeclException2 ( ExcInvalidIndex  ,
int  ,
int   
)

Exception

template<typename number>
ChunkSparseMatrix< number >::DeclException0 ( ExcDifferentChunkSparsityPatterns  )

Exception

template<typename number>
ChunkSparseMatrix< number >::DeclException2 ( ExcIteratorRange  ,
int  ,
int  ,
<< "The iterators denote a range of "<< arg1<< "  elements,
but the given number of rows was"<<  arg2 
)

Exception

template<typename number>
ChunkSparseMatrix< number >::DeclException0 ( ExcSourceEqualsDestination  )

Exception

ChunkSparsityPattern::DeclException1 ( ExcInvalidNumber  ,
int  ,
<< "The provided number is invalid here: "<<  arg1 
)

Exception

ChunkSparsityPattern::DeclException2 ( ExcInvalidIndex  ,
int  ,
int  ,
<< "The given index "<< arg1<< " should be less than "<< arg2<< "."   
)

Exception

ChunkSparsityPattern::DeclException2 ( ExcNotEnoughSpace  ,
int  ,
int  ,
<< "Upon entering a new entry to row "<< arg1<< ": there was no free entry any more. "<< std::endl<< "(Maximum number of entries for this row: "<< arg2<< "; maybe the matrix is already compressed?)"   
)

Exception

ChunkSparsityPattern::DeclException0 ( ExcNotCompressed  )

Exception

ChunkSparsityPattern::DeclException0 ( ExcMatrixIsCompressed  )

Exception

ChunkSparsityPattern::DeclException0 ( ExcEmptyObject  )

Exception

ChunkSparsityPattern::DeclException0 ( ExcInvalidConstructorCall  )

Exception

ChunkSparsityPattern::DeclException2 ( ExcIteratorRange  ,
int  ,
int  ,
<< "The iterators denote a range of "<< arg1<< "  elements,
but the given number of rows was"<<  arg2 
)

Exception

ChunkSparsityPattern::DeclException0 ( ExcMETISNotInstalled  )

Exception

ChunkSparsityPattern::DeclException1 ( ExcInvalidNumberOfPartitions  ,
int  ,
<< "The number of partitions you gave is "<< arg1<< "  ,
but must be greater than zero."   
)

Exception

ChunkSparsityPattern::DeclException2 ( ExcInvalidArraySize  ,
int  ,
int  ,
<< "The array has size "<< arg1<< " but should have size "<<  arg2 
)

Exception

ConstraintMatrix::DeclException0 ( ExcMatrixIsClosed  )

Exception

ConstraintMatrix::DeclException0 ( ExcMatrixNotClosed  )

Exception

ConstraintMatrix::DeclException1 ( ExcLineInexistant  ,
size_type  ,
<< "The specified line "<< arg1<< " does not exist."   
)

Exception

ConstraintMatrix::DeclException4 ( ExcEntryAlreadyExists  ,
size_type  ,
size_type  ,
double  ,
double  ,
<< "The entry for the indices "<< arg1<< " and "<< arg2<< " already  exists,
but the values"<< arg3<< "(old) and"<< arg4<< "(new) differ"<< "by"<< (arg4-arg3)<< "."   
)

Exception

ConstraintMatrix::DeclException2 ( ExcDoFConstrainedToConstrainedDoF  ,
int  ,
int  ,
<< "You tried to constrain DoF "<< arg1<< " to DoF "<< arg2<< "  ,
but that one is also constrained.This is not allowed!"   
)

Exception

ConstraintMatrix::DeclException1 ( ExcDoFIsConstrainedFromBothObjects  ,
size_type  ,
<< "Degree of freedom "<< arg1<< " is constrained from both object in a merge operation."   
)

Exception.

ConstraintMatrix::DeclException1 ( ExcDoFIsConstrainedToConstrainedDoF  ,
size_type  ,
<< "In the given argument a degree of freedom is constrained "<< "to another DoF with number "<< arg1<< "  ,
which however is constrained by this object.This is not"<< "allowed."   
)

Exception

ConstraintMatrix::DeclException1 ( ExcRowNotStoredHere  ,
size_type  ,
<< "The index set given to this constraint matrix indicates "<< "constraints for degree of freedom "<< arg1<< " should not be stored by this  object,
but a constraint"<< "is being added."   
)

Exception

ConstraintMatrix::DeclException2 ( ExcColumnNotStoredHere  ,
size_type  ,
size_type  ,
<< "The index set given to this constraint matrix indicates "<< "constraints using degree of freedom "<< arg2<< " should not be stored by this  object,
but a constraint"<< "for degree of freedom"<< arg1<<"uses it."   
)

Exception

ConstraintMatrix::DeclException2 ( ExcIncorrectConstraint  ,
int  ,
int  ,
<< "While distributing the constraint for DoF "<< arg1<< "  ,
it turns out that one of the processors"<< "who own the"<< arg2<< "degrees of freedom that x_"<< arg1<< "is constrained against does not know about"<< "the constraint on x_"<< arg1<< ".Did you not initialize the ConstraintMatrix"<< "with the appropriate locally_relevant set so"<< "that every processor who owns a DoF that constrains"<< "another DoF also knows about this constraint?"   
)

Exception

LACExceptions::DeclException0 ( ExcNotQuadratic  )

This function only works for quadratic matrices.

LACExceptions::DeclException0 ( ExcSingular  )

The operation cannot be finished since the matrix is singular.

LACExceptions::DeclException0 ( ExcDifferentBlockIndices  )

Block indices of two block objects are different.

LACExceptions::DeclException1 ( ExcPETScError  ,
int  ,
<< "An error with error number "<< arg1<< " occurred while calling a PETSc function"   
)

An error of a PETSc function was encountered. Check the PETSc documentation for details.

LACExceptions::DeclException1 ( ExcTrilinosError  ,
int  ,
<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function"   
)

An error of a Trilinos function was encountered. Check the Trilinos documentation for details.

template<typename number>
FullMatrix< number >::DeclException0 ( ExcEmptyMatrix  )

Exception

template<typename number>
FullMatrix< number >::DeclException1 ( ExcNotRegular  ,
number  ,
<< "The maximal pivot is "<< arg1<< "  ,
which is below the threshold.The matrix may be singular."   
)

Exception

template<typename number>
FullMatrix< number >::DeclException3 ( ExcInvalidDestination  ,
size_type  ,
size_type  ,
size_type  ,
<< "Target region not in matrix: size in this  direction = "<< arg1<< ",
size of new  matrix = "<< arg2<< " 
)

Exception

template<typename number>
FullMatrix< number >::DeclException0 ( ExcSourceEqualsDestination  )

Exception

template<typename number>
FullMatrix< number >::DeclException0 ( ExcMatrixNotPositiveDefinite  )

Exception

template<typename Number>
parallel::distributed::BlockVector< Number >::DeclException0 ( ExcIteratorRangeDoesNotMatchVectorSize  )

Exception

PETScWrappers::BlockSparseMatrix::DeclException4 ( ExcIncompatibleRowNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing row numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

PETScWrappers::BlockSparseMatrix::DeclException4 ( ExcIncompatibleColNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing column numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

PETScWrappers::BlockVector::DeclException0 ( ExcIteratorRangeDoesNotMatchVectorSize  )

Exception

PETScWrappers::MPI::SparseMatrix::DeclException2 ( ExcLocalRowsTooLarge  ,
int  ,
int  ,
<< "The number of local rows "<< arg1<< " must be larger than the total number of rows "<<  arg2 
)

Exception

template<typename MatrixType, typename inverse_type = typename MatrixType::value_type>
PreconditionBlock< MatrixType, inverse_type >::DeclException2 ( ExcWrongBlockSize  ,
int  ,
int  ,
<< "The blocksize "<< arg1<< " and the size of the matrix "<< arg2<< " do not match."   
)

For non-overlapping block preconditioners, the block size must divide the matrix size. If not, this exception gets thrown.

template<typename MatrixType, typename inverse_type = typename MatrixType::value_type>
PreconditionBlock< MatrixType, inverse_type >::DeclException0 ( ExcInverseMatricesAlreadyExist  )

Exception

template<typename MatrixType = SparseMatrix<double>, typename VectorType = ::Vector<double>>
PreconditionSelector< MatrixType, VectorType >::DeclException0 ( ExcNoMatrixGivenToUse  )

Exception.

template<class VectorType = Vector<double>>
SolverMinRes< VectorType >::DeclException0 ( ExcPreconditionerNotDefinite  )

Exception

template<typename number >
SparseLUDecomposition< number >::DeclException1 ( ExcInvalidStrengthening  ,
double  ,
<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!"   
)

Exception

template<typename number>
SparseILU< number >::DeclException1 ( ExcInvalidStrengthening  ,
double  ,
<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!"   
)

Exception

template<typename number>
SparseILU< number >::DeclException1 ( ExcZeroPivot  ,
size_type  ,
<< "While computing the ILU  decomposition,
the algorithm""found a zero pivot on the diagonal of row"<< arg1<< ".This must stop the ILU algorithm because it means""that the matrix for which you try to compute a""decomposition is singular."   
)

Exception

template<typename number>
SparseMatrix< number >::DeclException2 ( ExcInvalidIndex  ,
int  ,
int   
)

Exception

template<typename number>
SparseMatrix< number >::DeclExceptionMsg ( ExcDifferentSparsityPatterns  ,
"When copying one sparse matrix into  another,
""or when adding one sparse matrix to  another,
""both matrices need to refer to the same""sparsity pattern."   
)

Exception

template<typename number>
SparseMatrix< number >::DeclException2 ( ExcIteratorRange  ,
int  ,
int  ,
<< "The iterators denote a range of "<< arg1<< "  elements,
but the given number of rows was"<<  arg2 
)

Exception

template<typename number>
SparseMatrix< number >::DeclException0 ( ExcSourceEqualsDestination  )

Exception

template<typename number>
SparseMatrixEZ< number >::DeclException0 ( ExcNoDiagonal  )

Exception for missing diagonal entry.

template<typename number>
SparseMatrixEZ< number >::DeclException2 ( ExcInvalidEntry  ,
int  ,
int  ,
<< "The entry with index ("<< arg1<< ','<< arg2<< ") does not exist."   
)

Exception

template<typename number >
SparseMIC< number >::DeclException0 ( ExcStrengthenDiagonalTooSmall  )

Exception

template<typename number >
SparseMIC< number >::DeclException1 ( ExcInvalidStrengthening  ,
double  ,
<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!"   
)

Exception

template<typename number >
SparseMIC< number >::DeclException2 ( ExcDecompositionNotStable  ,
int  ,
double  ,
<< "The diagonal element ("<< arg1<<","<< arg1<<") is "<< arg2<<"  ,
but must be positive"   
)

Exception

SparsityPattern::DeclException2 ( ExcNotEnoughSpace  ,
int  ,
int  ,
<< "Upon entering a new entry to row "<< arg1<< ": there was no free entry any more. "<< std::endl<< "(Maximum number of entries for this row: "<< arg2<< "; maybe the matrix is already compressed?)"   
)

You tried to add an element to a row, but there was no space left.

SparsityPattern::DeclException0 ( ExcNotCompressed  )

The operation is only allowed after the SparsityPattern has been set up and compress() was called.

SparsityPattern::DeclException0 ( ExcMatrixIsCompressed  )

This operation changes the structure of the SparsityPattern and is not possible after compress() has been called.

SparsityPattern::DeclException0 ( ExcInvalidConstructorCall  )

Exception

SparsityPattern::DeclException0 ( ExcDiagonalNotOptimized  )

This exception is thrown if the matrix does not follow the convention of storing diagonal elements first in row. Refer to SparityPattern::optimize_diagonal() for more information.

SparsityPattern::DeclException2 ( ExcIteratorRange  ,
int  ,
int  ,
<< "The iterators denote a range of "<< arg1<< "  elements,
but the given number of rows was"<<  arg2 
)

Exception

SparsityPattern::DeclException1 ( ExcInvalidNumberOfPartitions  ,
int  ,
<< "The number of partitions you gave is "<< arg1<< "  ,
but must be greater than zero."   
)

Exception

template<typename number >
SwappableVector< number >::DeclException0 ( ExcSizeZero  )

Exception.

template<typename number >
SwappableVector< number >::DeclException0 ( ExcSizeNonzero  )

Exception.

template<typename number >
SwappableVector< number >::DeclException1 ( ExcInvalidFilename  ,
std::string   
)

Exception.

template<typename number >
SwappableVector< number >::DeclException0 ( ExcInvalidCopyOperation  )

Exception.

TrilinosWrappers::BlockSparseMatrix::DeclException4 ( ExcIncompatibleRowNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing row numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

TrilinosWrappers::BlockSparseMatrix::DeclException4 ( ExcIncompatibleColNumbers  ,
int  ,
int  ,
int  ,
int  ,
<< "The blocks and have differing column numbers."  ["<< arg1<< ','<< arg2<< "]["<< arg3<< ','<< arg4<< "] 
)

Exception

TrilinosWrappers::SparseMatrix::DeclException1 ( ExcTrilinosError  ,
int  ,
<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function"   
)

Exception

TrilinosWrappers::SparseMatrix::DeclException2 ( ExcInvalidIndex  ,
size_type  ,
size_type   
)

Exception

TrilinosWrappers::SparseMatrix::DeclException0 ( ExcSourceEqualsDestination  )

Exception

TrilinosWrappers::SparseMatrix::DeclException0 ( ExcMatrixNotCompressed  )

Exception

TrilinosWrappers::SparseMatrix::DeclException4 ( ExcAccessToNonLocalElement  ,
size_type  ,
size_type  ,
size_type  ,
size_type  ,
<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a distributed  matrix,
but only rows"<< arg3<< "through"<< arg4<< "are stored locally and can be accessed."   
)

Exception

TrilinosWrappers::SparseMatrix::DeclException2 ( ExcAccessToNonPresentElement  ,
size_type  ,
size_type  ,
<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a sparse  matrix,
but it appears to not"<< "exist in the Trilinos sparsity pattern."   
)

Exception

TrilinosWrappers::SparsityPattern::DeclException1 ( ExcTrilinosError  ,
int  ,
<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function"   
)

Exception

TrilinosWrappers::SparsityPattern::DeclException2 ( ExcInvalidIndex  ,
size_type  ,
size_type   
)

Exception

TrilinosWrappers::SparsityPattern::DeclException0 ( ExcSourceEqualsDestination  )

Exception

TrilinosWrappers::SparsityPattern::DeclException4 ( ExcAccessToNonLocalElement  ,
size_type  ,
size_type  ,
size_type  ,
size_type  ,
<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a distributed  matrix,
but only rows"<< arg3<< "through"<< arg4<< "are stored locally and can be accessed."   
)

Exception

TrilinosWrappers::SparsityPattern::DeclException2 ( ExcAccessToNonPresentElement  ,
size_type  ,
size_type  ,
<< "You tried to access element ("<< arg1<< "/"<< arg2<< ")"<< " of a sparse  matrix,
but it appears to not"<< "exist in the Trilinos sparsity pattern."   
)

Exception

template<typename VectorType = ::Vector<double>>
VectorMemory< VectorType >::DeclException0 ( ExcNoMoreVectors  )

No more available vectors.

template<typename VectorType = ::Vector<double>>
VectorMemory< VectorType >::DeclException0 ( ExcNotAllocatedHere  )

Vector was not allocated from this memory pool.

template<int dim, int spacedim = dim, typename number = double>
MeshWorker::LocalIntegrator< dim, spacedim, number >::DeclException0 ( ExcPureFunction  )

This error is thrown if one of the virtual functions cell(), boundary(), or face() is called without being overloaded in a derived class. Consider setting use_cell, use_boundary, and use_face to false, respectively.

internal::Triangulation::DeclException1 ( ExcGridHasInvalidCell  ,
int  ,
<< "Something went wrong when making cell "<< arg1<< ". Read the docs and the source code "<< "for more information."   
)

Exception

internal::Triangulation::DeclException1 ( ExcInternalErrorOnCell  ,
int  ,
<< "Something went wrong upon construction of cell "<<  arg1 
)

Exception

internal::Triangulation::DeclException1 ( ExcCellHasNegativeMeasure  ,
int  ,
<< "Cell "<< arg1<< " has negative measure. This typically "<< "indicates some distortion in the  cell,
or a mistakenly"<< "swapped pair of vertices in the input to"<< "Triangulation::create_triangulation()."   
)

A cell was entered which has negative measure. In most cases, this is due to a wrong order of the vertices of the cell.

internal::Triangulation::DeclException3 ( ExcInvalidVertexIndex  ,
int  ,
int  ,
int  ,
<< "Error while creating cell "<< arg1<< ": the vertex index "<< arg2<< " must be between 0 and "<< arg3<< "."   
)

A cell is created with a vertex number exceeding the vertex array.

internal::Triangulation::DeclException2 ( ExcLineInexistant  ,
int  ,
int  ,
<< "While trying to assign a boundary indicator to a line: "<< "the line with end vertices "<< arg1<< " and "<< arg2<< " does not exist."   
)

Exception

internal::Triangulation::DeclException4 ( ExcQuadInexistant  ,
int  ,
int  ,
int  ,
int  ,
<< "While trying to assign a boundary indicator to a quad: "<< "the quad with bounding lines "<< arg1<< "  ,
"<< arg2<< "  ,
"<< arg3<< "  ,
"<< arg4<< "does not exist."   
)

Exception

internal::Triangulation::DeclException3 ( ExcInteriorLineCantBeBoundary  ,
int  ,
int  ,
types::boundary_id  ,
<< "The input data for creating a triangulation contained "<< "information about a line with indices "<< arg1<< " and "<< arg2<< " that is described to have boundary indicator "<< (int) arg3<< ".  However,
this is an internal line not located on the"<< "boundary.You cannot assign a boundary indicator to it."<< std::endl<< std::endl<< "If this happened at a place where you call"<< "Triangulation::create_triangulation()  yourself,
you need"<< "to check the SubCellData object you pass to this function."<< std::endl<< std::endl<< "If this happened in a place where you are reading a mesh"<< "from a  file,
then you need to investigate why such a line"<< "ended up in the input file.A typical case is a geometry"<< "that consisted of multiple parts and for which the mesh"<< "generator program assumes that the interface between"<< "two parts is a boundary when that isn't supposed to be"<< "the  case,
or where the mesh generator simply assigns"<< "'geometry indicators'to lines at the perimeter of"<< "a part that are not supposed to be interpreted as"<< "'boundary indicators'."   
)

Exception

internal::Triangulation::DeclException5 ( ExcInteriorQuadCantBeBoundary  ,
int  ,
int  ,
int  ,
int  ,
types::boundary_id  ,
<< "The input data for creating a triangulation contained "<< "information about a quad with indices "<< arg1<< "  ,
"<< arg2<< "  ,
"<< arg3<< "  ,
and"<< arg4<< "that is described to have boundary indicator"<< (int) arg5<< ".  However,
this is an internal quad not located on the"<< "boundary.You cannot assign a boundary indicator to it."<< std::endl<< std::endl<< "If this happened at a place where you call"<< "Triangulation::create_triangulation()  yourself,
you need"<< "to check the SubCellData object you pass to this function."<< std::endl<< std::endl<< "If this happened in a place where you are reading a mesh"<< "from a  file,
then you need to investigate why such a quad"<< "ended up in the input file.A typical case is a geometry"<< "that consisted of multiple parts and for which the mesh"<< "generator program assumes that the interface between"<< "two parts is a boundary when that isn't supposed to be"<< "the  case,
or where the mesh generator simply assigns"<< "'geometry indicators'to quads at the surface of"<< "a part that are not supposed to be interpreted as"<< "'boundary indicators'."   
)

Exception

internal::Triangulation::DeclException2 ( ExcMultiplySetLineInfoOfLine  ,
int  ,
int  ,
<< "In SubCellData the line info of the line with vertex indices "<< arg1<< " and "<< arg2<< " appears more than once. "<< "This is not allowed."   
)

Exception