Reference documentation for deal.II version 8.1.0
Namespaces | Classes | Macros | 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 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)
 

Functions

 BlockSparsityPatternBase< SparsityPatternBase >::DeclException4 (ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.")
 
 BlockSparsityPatternBase< SparsityPatternBase >::DeclException4 (ExcIncompatibleColNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing column numbers.")
 
 BlockSparsityPatternBase< SparsityPatternBase >::DeclException0 (ExcInvalidConstructorCall)
 
 BlockVector< Number >::DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize)
 
 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.")
 
 parallel::distributed::BlockVector< Number >::DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize)
 
 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")
 
 SolverMinRes< VECTOR >::DeclException0 (ExcPreconditionerNotDefinite)
 
 BlockSparseMatrix< number >::DeclException0 (ExcBlockDimensionMismatch)
 
 BlockTrianglePrecondition< number >::DeclException1 (ExcNoDiagonal, size_type,<< "No diagonal entry was added for block "<< arg1)
 
 BlockTrianglePrecondition< number >::DeclException1 (ExcMultipleDiagonal, size_type,<< "Inverse diagonal entries may not be added in block "<< arg1)
 
 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.")
 
 PreconditionBlock< MATRIX, inverse_type >::DeclException2 (ExcWrongBlockSize, int, int,<< "The blocksize "<< arg1<< " and the size of the matrix "<< arg2<< " do not match.")
 
 PreconditionBlock< MATRIX, inverse_type >::DeclException0 (ExcInverseMatricesAlreadyExist)
 
 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 (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?")
 
 internal::BlockVectorIterators::Iterator< BlockVectorType, constness >::DeclException0 (ExcPointerToDifferentVectors)
 
 internal::BlockVectorIterators::Iterator< BlockVectorType, constness >::DeclException0 (ExcCastingAwayConstness)
 
 PETScWrappers::BlockVector::DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize)
 
 ChunkSparseMatrix< number >::DeclException2 (ExcInvalidIndex, int, int,<< "The entry with index <"<< arg1<< ','<< arg2<< "> does not exist.")
 
 ChunkSparseMatrix< number >::DeclException1 (ExcInvalidIndex1, int,<< "The index "<< arg1<< " is not in the allowed range.")
 
 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)
 
 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.")
 
 SparseLUDecomposition< number >::DeclException1 (ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
 
 PETScWrappers::MPI::SparseMatrix::DeclException2 (ExcLocalRowsTooLarge, int, int,<< "The number of local rows "<< arg1<< " must be larger than the total number of rows "<< arg2)
 
 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")
 
 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.")
 
 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.")
 
 VectorMemory< VECTOR >::DeclException0 (ExcNoMoreVectors)
 
 VectorMemory< VECTOR >::DeclException0 (ExcNotAllocatedHere)
 
 SparseILU< number >::DeclException1 (ExcInvalidStrengthening, double,<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!")
 
 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)
 
 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)
 
 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)
 
 PreconditionSelector< MATRIX, VECTOR >::DeclException0 (ExcNoMatrixGivenToUse)
 
 SparseMatrixEZ< number >::DeclException0 (ExcNoDiagonal)
 
 SparseMatrixEZ< number >::DeclException2 (ExcInvalidEntry, int, int,<< "The entry with index ("<< arg1<< ','<< arg2<< ") does not exist.")
 
 SparseMatrixEZ< number >::DeclException2 (ExcEntryAllocationFailure, int, int,<< "An entry with index ("<< arg1<< ','<< arg2<< ") cannot be allocated.")
 
 SparseMatrix< number >::DeclException2 (ExcInvalidIndex, int, int,<< "The entry with index <"<< arg1<< ','<< arg2<< "> does not exist.")
 
 SparseMatrix< number >::DeclException1 (ExcInvalidIndex1, int,<< "The index "<< arg1<< " is not in the allowed range.")
 
 SparseMatrix< number >::DeclException0 (ExcDifferentSparsityPatterns)
 
 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)
 
 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.")
 
 DoFAccessor< structdim, DH, level_dof_access >::DeclException0 (ExcInvalidObject)
 
 DoFAccessor< structdim, DH, level_dof_access >::DeclException0 (ExcVectorNotEmpty)
 
 DoFAccessor< structdim, DH, level_dof_access >::DeclException0 (ExcVectorDoesNotMatch)
 
 DoFAccessor< structdim, DH, level_dof_access >::DeclException0 (ExcMatrixDoesNotMatch)
 
 DoFAccessor< structdim, DH, level_dof_access >::DeclException0 (ExcNotActive)
 
 DoFAccessor< structdim, DH, level_dof_access >::DeclException0 (ExcCantCompareIterators)
 
 DoFAccessor< 0, DH< 1, spacedim >, level_dof_access >::DeclException0 (ExcInvalidObject)
 
 DoFAccessor< 0, DH< 1, spacedim >, level_dof_access >::DeclException0 (ExcVectorNotEmpty)
 
 DoFAccessor< 0, DH< 1, spacedim >, level_dof_access >::DeclException0 (ExcVectorDoesNotMatch)
 
 DoFAccessor< 0, DH< 1, spacedim >, level_dof_access >::DeclException0 (ExcMatrixDoesNotMatch)
 
 DoFAccessor< 0, DH< 1, spacedim >, level_dof_access >::DeclException0 (ExcNotActive)
 
 DoFAccessor< 0, DH< 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)
 
 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)
 
 TriaAccessorExceptions::DeclException0 (ExcCellNotUsed)
 
 TriaAccessorExceptions::DeclException0 (ExcCellNotActive)
 
 TriaAccessorExceptions::DeclException0 (ExcCellHasNoChildren)
 
 TriaAccessorExceptions::DeclException0 (ExcCellHasNoParent)
 
 TriaAccessorExceptions::DeclException0 (ExcUnusedCellAsChild)
 
 TriaAccessorExceptions::DeclException1 (ExcCantSetChildren, int,<< "You can only set the child index if the cell has no "<< "children, or clear it. The given "<< "index was "<< arg1<< " (-1 means: clear children)")
 
 TriaAccessorExceptions::DeclException0 (ExcUnusedCellAsNeighbor)
 
 TriaAccessorExceptions::DeclException0 (ExcUncaughtCase)
 
 TriaAccessorExceptions::DeclException0 (ExcDereferenceInvalidObject)
 
 TriaAccessorExceptions::DeclException0 (ExcCantCompareIterators)
 
 TriaAccessorExceptions::DeclException0 (ExcNeighborIsCoarser)
 
 TriaAccessorExceptions::DeclException0 (ExcNeighborIsNotCoarser)
 
 TriaAccessorExceptions::DeclException0 (ExcFacesHaveNoLevel)
 
 TriaAccessorExceptions::DeclException1 (ExcSetOnlyEvenChildren, int,<< "You can only set the child index of an even numbered child."<< "The number of the child given was "<< arg1<< ".")
 
 CellAccessor< dim, spacedim >::DeclException0 (ExcRefineCellNotActive)
 
 CellAccessor< dim, spacedim >::DeclException0 (ExcCellFlaggedForRefinement)
 
 CellAccessor< dim, spacedim >::DeclException0 (ExcCellFlaggedForCoarsening)
 
 MeshWorker::LocalIntegrator< dim, spacedim, number >::DeclException0 (ExcPureFunction)
 
 Mapping< dim, spacedim >::DeclException0 (ExcTransformationFailed)
 
 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<< ".")
 
 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)
 
 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)
 
 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 >::DeclException0 (ExcUnitShapeValuesDoNotExist)
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcFEHasNoSupportPoints)
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcEmbeddingVoid)
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcProjectionVoid)
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcConstraintsVoid)
 
 FiniteElement< dim, spacedim >::DeclException2 (ExcWrongInterfaceMatrixSize, int, int,<< "The interface matrix has a size of "<< arg1<< "x"<< arg2<< ", which is not reasonable in the present dimension.")
 
 FiniteElement< dim, spacedim >::DeclException2 (ExcComponentIndexInvalid, int, int,<< "The component-index pair ("<< arg1<< ", "<< arg2<< ") is invalid, i.e. non-existent.")
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcInterpolationNotImplemented)
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcBoundaryFaceUsed)
 
 FiniteElement< dim, spacedim >::DeclException0 (ExcJacobiDeterminantHasWrongSign)
 
 ConvergenceTable::DeclException0 (ExcWrongValueType)
 
 ConvergenceTable::DeclException1 (ExcRateColumnAlreadyExists, std::string,<< "Rate column <"<< arg1<< "> does already exist.")
 
 QuadratureSelector< dim >::DeclException1 (ExcInvalidQGaussOrder, int,<< "You tried to generate QGauss with an invalid order of "<< arg1<< " (must be >= 2)")
 
 QuadratureSelector< dim >::DeclException2 (ExcInvalidOrder, std::string, unsigned int,<< "You tried to generate a "<< arg1<< " object; no order is needed ("<< arg2<< " was given as parameter)")
 
 QuadratureSelector< dim >::DeclException1 (ExcInvalidQuadrature, std::string,<< arg1<< " is not a valid quadrature name for a quadrature rule")
 
 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")
 
 ParameterHandler::DeclException1 (ExcConversionError, std::string,<< "Error when trying to convert the following string: "<< arg1)
 
 Tensor< 0, dim, Number >::DeclException1 (ExcDimTooSmall, int,<< "dim must be positive, but was "<< arg1)
 
 Tensor< 1, dim, Number >::DeclException1 (ExcDimTooSmall, int,<< "dim must be positive, but was "<< arg1)
 
 FunctionDerivative< dim >::DeclException0 (ExcInvalidFormula)
 
 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,r.")
 
::ExceptionBaseStandardExceptions::ExcDivideByZero ()
 
::ExceptionBaseStandardExceptions::ExcNumberNotFinite ()
 
::ExceptionBaseStandardExceptions::ExcOutOfMemory ()
 
::ExceptionBaseStandardExceptions::ExcMemoryLeak (int arg1) throw (errortext << "Destroying memory handler while " << arg1 << " objects are still allocated" )
 
::ExceptionBaseStandardExceptions::ExcIO ()
 
::ExceptionBaseStandardExceptions::ExcFileNotOpen (char *arg1) throw (errortext << "Could not open file " << arg1 )
 
::ExceptionBaseStandardExceptions::ExcNotImplemented ()
 
::ExceptionBaseStandardExceptions::ExcInternalError ()
 
::ExceptionBaseStandardExceptions::ExcPureFunctionCalled ()
 
::ExceptionBaseStandardExceptions::ExcInvalidConstructorCall ()
 
::ExceptionBaseStandardExceptions::ExcNotInitialized ()
 
::ExceptionBaseStandardExceptions::ExcInvalidState ()
 
::ExceptionBaseStandardExceptions::ExcImpossibleInDim (int arg1) throw (errortext << "Impossible in " << arg1 << "d." )
 
::ExceptionBaseStandardExceptions::ExcZero ()
 
::ExceptionBaseStandardExceptions::ExcEmptyObject ()
 
::ExceptionBaseStandardExceptions::ExcDimensionMismatch (std::size_t arg1, std::size_t arg2) throw (errortext << "Dimension " << arg1 << " not equal to " << arg2 )
 
::ExceptionBaseStandardExceptions::ExcDimensionMismatch2 (int arg1, int arg2, int arg3) throw (errortext << "Dimension " << arg1 << " neither equal to " << arg2 << " nor to " << arg3 )
 
::ExceptionBaseStandardExceptions::ExcIndexRange (int arg1, int arg2, int arg3) throw (errortext << "Index " << arg1 << " is not in [" << arg2 << "," << arg3 << "[" )
 
template<typename T >
::ExceptionBaseStandardExceptions::ExcIndexRangeType (T arg1, T arg2, T arg3) throw (errortext << "Index " << arg1 << " is not in [" << arg2 << "," << arg3 << "[" )
 
::ExceptionBaseStandardExceptions::ExcLowerRange (int arg1, int arg2) throw (errortext << "Number " << arg1 << " must be larger or equal " << arg2 )
 
template<typename T >
::ExceptionBaseStandardExceptions::ExcLowerRangeType (T arg1, T arg2) throw (errortext << "Number " << arg1 << " must be larger or equal " << arg2 )
 
::ExceptionBaseStandardExceptions::ExcNotMultiple (int arg1, int arg2) throw (errortext << "Division " << arg1 << " by " << arg2 << " has remainder different from zero" )
 
::ExceptionBaseStandardExceptions::ExcInvalidIterator ()
 
::ExceptionBaseStandardExceptions::ExcIteratorPastEnd ()
 
::ExceptionBaseStandardExceptions::ExcMessage (std::string arg1) throw (errortext << arg1 )
 
::ExceptionBaseStandardExceptions::ExcGhostsPresent ()
 
::ExceptionBaseStandardExceptions::ExcScalarAssignmentOnlyForZeroValue ()
 
::ExceptionBaseStandardExceptions::ExcNeedsLAPACK ()
 
::ExceptionBaseStandardExceptions::ExcNeedsNetCDF ()
 
::ExceptionBaseStandardExceptions::ExcNeedsFunctionparser ()
 
 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)
 
 Subscriptor::DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects.\n"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.")
 
 Subscriptor::DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1)
 
 FunctionParser< dim >::DeclException2 (ExcParseError, int, char *,<< "Parsing Error at Column "<< arg1<< ". The parser said: "<< arg2)
 
 FunctionParser< dim >::DeclException2 (ExcInvalidExpressionSize, int, int,<< "The number of components ("<< arg1<< ") is not equal to the number of expressions ("<< arg2<< ").")
 
 Threads::DummyBarrier::DeclException1 (ExcBarrierSizeNotUseful, int,<< "In single-thread mode, other barrier sizes than 1 are not "<< "useful. You gave "<< arg1)
 
 Threads::Task< RT >::DeclException0 (ExcNoTask)
 
 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")
 

Exceptions

 Triangulation< dim, spacedim >::DeclException1 (ExcInvalidLevel, int,<< "The given level "<< arg1<< " is not in the valid range!")
 
 Triangulation< dim, spacedim >::DeclException0 (ExcTriangulationNotEmpty)
 
 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)
 

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:

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)) \
issue_error(::deal_II_exceptions::internals::abort_on_exception,\
__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
}
void issue_error(ExceptionHandling handling, const char *file, int line, const char *function, const char *cond, const char *exc_name, exc e)
Definition: exceptions.h:258

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.

Author
Wolfgang Bangerth, 1997, 1998, Matthias Maier, 2013

Definition at line 299 of file exceptions.h.

#define AssertNothrow (   cond,
  exc 
)
Value:
{ \
if (!(cond)) \
::deal_II_exceptions::internals::abort_nothrow_on_exception, \
__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
}
void issue_error(ExceptionHandling handling, const char *file, int line, const char *function, const char *cond, const char *exc_name, exc e)
Definition: exceptions.h:258

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.

Author
Wolfgang Bangerth, 1997, 1998, Matthias Maier, 2013

Definition at line 327 of file exceptions.h.

#define AssertThrow (   cond,
  exc 
)
Value:
{ \
if (!(cond)) \
issue_error(::deal_II_exceptions::internals::throw_on_exception,\
__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \
}
void issue_error(ExceptionHandling handling, const char *file, int line, const char *function, const char *cond, const char *exc_name, exc e)
Definition: exceptions.h:258

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.

ExceptionBase

Author
Wolfgang Bangerth, 1997, 1998, Matthias Maier, 2013

Definition at line 362 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 505 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 515 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 525 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 535 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 545 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 555 of file exceptions.h.

#define AssertDimension (   dim1,
  dim2 
)
Value:
Assert((dim1) == (dim2), \
ExcDimensionMismatch((dim1),(dim2)))
#define Assert(cond, exc)
Definition: exceptions.h:299
::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)

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 858 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:858

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 870 of file exceptions.h.

#define AssertIndexRange (   index,
  range 
)
Value:
Assert((index) < (range), \
ExcIndexRange((index),0,(range)))
#define Assert(cond, exc)
Definition: exceptions.h:299
::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)

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 888 of file exceptions.h.

Function Documentation

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

Exception

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

Exception

template<class SparsityPatternBase>
BlockSparsityPatternBase< SparsityPatternBase >::DeclException0 ( ExcInvalidConstructorCall  )

Exception

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

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 Number>
parallel::distributed::BlockVector< Number >::DeclException0 ( ExcIteratorRangeDoesNotMatchVectorSize  )

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

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

Exception

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

Exception

template<typename number = double>
BlockTrianglePrecondition< number >::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>
BlockTrianglePrecondition< number >::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.

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

template<class MATRIX, typename inverse_type = typename MATRIX::value_type>
PreconditionBlock< MATRIX, 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<class MATRIX, typename inverse_type = typename MATRIX::value_type>
PreconditionBlock< MATRIX, inverse_type >::DeclException0 ( ExcInverseMatricesAlreadyExist  )

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 ( 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

template<class BlockVectorType, bool constness>
internal::BlockVectorIterators::Iterator< BlockVectorType, constness >::DeclException0 ( ExcPointerToDifferentVectors  )

Exception.

template<class BlockVectorType, bool constness>
internal::BlockVectorIterators::Iterator< BlockVectorType, constness >::DeclException0 ( ExcCastingAwayConstness  )

Exception.

PETScWrappers::BlockVector::DeclException0 ( ExcIteratorRangeDoesNotMatchVectorSize  )

Exception

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

Exception

template<typename number>
ChunkSparseMatrix< number >::DeclException1 ( ExcInvalidIndex1  ,
int  ,
<< "The index "<< arg1<< " is not in the allowed range."   
)

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

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 >
SparseLUDecomposition< number >::DeclException1 ( ExcInvalidStrengthening  ,
double  ,
<< "The strengthening parameter "<< arg1<< " is not greater or equal than zero!"   
)

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

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.

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

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

template<class VECTOR = ::Vector<double>>
VectorMemory< VECTOR >::DeclException0 ( ExcNoMoreVectors  )

No more available vectors.

template<class VECTOR = ::Vector<double>>
VectorMemory< VECTOR >::DeclException0 ( ExcNotAllocatedHere  )

Vector was not allocated from this memory pool.

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

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

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.

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<class MATRIX = SparseMatrix<double>, class VECTOR = ::Vector<double>>
PreconditionSelector< MATRIX, VECTOR >::DeclException0 ( ExcNoMatrixGivenToUse  )

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>
SparseMatrix< number >::DeclException2 ( ExcInvalidIndex  ,
int  ,
int   
)

Exception

template<typename number>
SparseMatrix< number >::DeclException1 ( ExcInvalidIndex1  ,
int  ,
<< "The index "<< arg1<< " is not in the allowed range."   
)

Exception

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

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<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.

template<int structdim, class DH, bool level_dof_access>
DoFAccessor< structdim, DH, level_dof_access >::DeclException0 ( ExcInvalidObject  )

Exceptions for child classes

template<int structdim, class DH, bool level_dof_access>
DoFAccessor< structdim, DH, level_dof_access >::DeclException0 ( ExcVectorNotEmpty  )

Exception

template<int structdim, class DH, bool level_dof_access>
DoFAccessor< structdim, DH, level_dof_access >::DeclException0 ( ExcVectorDoesNotMatch  )

Exception

template<int structdim, class DH, bool level_dof_access>
DoFAccessor< structdim, DH, level_dof_access >::DeclException0 ( ExcMatrixDoesNotMatch  )

Exception

template<int structdim, class DH, bool level_dof_access>
DoFAccessor< structdim, DH, level_dof_access >::DeclException0 ( ExcNotActive  )

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

template<int structdim, class DH, bool level_dof_access>
DoFAccessor< structdim, DH, level_dof_access >::DeclException0 ( ExcCantCompareIterators  )

Exception

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

Exceptions for child classes

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

Exception

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

Exception

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

Exception

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

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

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

Exception

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<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.

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<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 >::DeclException0 ( ExcTriangulationNotEmpty  )

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, 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.

template<int dim, int spacedim = dim>
Mapping< dim, spacedim >::DeclException0 ( 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.

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>
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
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 = 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 >::DeclException0 ( ExcUnitShapeValuesDoNotExist  )

Exception

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

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

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

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

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

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

Exception

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

Attempt to access constraint matrices of a finite element which 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 in the present dimension."   
)

Exception

template<int dim, int spacedim = dim>
FiniteElement< dim, spacedim >::DeclException2 ( ExcComponentIndexInvalid  ,
int  ,
int  ,
<< "The component-index pair ("<< arg1<< ", "<< arg2<< ") is  invalid,
i.e.non-existent."   
)

Exception

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

Exception

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

Exception

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

Exception

ConvergenceTable::DeclException0 ( ExcWrongValueType  )

Exception

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

Exception

template<int dim>
QuadratureSelector< dim >::DeclException1 ( ExcInvalidQGaussOrder  ,
int  ,
<< "You tried to generate QGauss with an invalid order of "<< arg1<< " (must be >= 2)"   
)

Exception

template<int dim>
QuadratureSelector< dim >::DeclException2 ( ExcInvalidOrder  ,
std::string  ,
unsigned  int,
<< "You tried to generate a "<< arg1<< " object; no order is needed ("<< arg2<< " was given as parameter)"   
)

Exception

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

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

ParameterHandler::DeclException1 ( ExcConversionError  ,
std::string  ,
<< "Error when trying to convert the following string: "<<  arg1 
)

Exception

template<int dim, typename Number >
Tensor< 0, dim, Number >::DeclException1 ( ExcDimTooSmall  ,
int  ,
<< "dim must be  positive,
but was"<<  arg1 
)

Only tensors with a positive dimension are implemented. This exception is thrown by the constructor if the template argument dim is zero or less.

template<int dim, typename Number >
Tensor< 1, dim, Number >::DeclException1 ( ExcDimTooSmall  ,
int  ,
<< "dim must be  positive,
but was"<<  arg1 
)

Only tensors with a positive dimension are implemented. This exception is thrown by the constructor if the template argument dim is zero or less.

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

Exception.

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

::ExceptionBase& StandardExceptions::ExcDivideByZero ( )
static

Exception denoting a division by zero.

Note
Unfortunately, automatic detection of division by zero is very hardware dependent and requires severe hacking on some architectures. Therefore, this exception is only raised if the test is performed explicitly.
::ExceptionBase& StandardExceptions::ExcNumberNotFinite ( )
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).

::ExceptionBase& StandardExceptions::ExcOutOfMemory ( )
static

Trying to allocate a new object failed due to lack of free memory.

::ExceptionBase& StandardExceptions::ExcMemoryLeak ( int  arg1)
throw (errortext<< "Destroying memory handler while "<< arg1<< " objects are still allocated"
)
static

A memory handler reached a point where all allocated objects should have been released. Since this exception is thrown, some were still allocated.

::ExceptionBase& StandardExceptions::ExcIO ( )
static

An error occurred reading or writing a file.

::ExceptionBase& StandardExceptions::ExcFileNotOpen ( char *  arg1)
throw (errortext<< "Could not open file "<< arg1
)
static

An error occurred opening the named file.

The constructor takes a single argument of type char* naming the file.

::ExceptionBase& StandardExceptions::ExcNotImplemented ( )
static

Exception denoting a part of the library or application program that has not yet been implemented. In many cases, this only indicates that there wasn't much need for something yet, not that this is difficult to implement. It is therefore quite worth the effort to take a look at the corresponding place and see whether it can be implemented without too much effort.

::ExceptionBase& StandardExceptions::ExcInternalError ( )
static

This exception usually indicates that some condition which the programmer thinks must be satisfied at a certain point in an algorithm, is not fulfilled. This might be due to some programming error above, due to changes to the algorithm that did not preserve this assertion, or due to assumptions the programmer made that are not valid at all (i.e. the exception is thrown although there is no error here). Within the library, this exception is most often used when we write some kind of complicated algorithm and are not yet sure whether we got it right; we then put in assertions after each part of the algorithm that check for some conditions that should hold there, and throw an exception if they do not.

We usually leave in these assertions even after we are confident that the implementation is correct, since if someone later changes or extends the algorithm, these exceptions will indicate to him if he violates assumptions that are used later in the algorithm. Furthermore, it sometimes happens that an algorithm does not work in very rare corner cases. These cases will then be trapped sooner or later by the exception, so that the algorithm can then be fixed for these cases as well.

::ExceptionBase& StandardExceptions::ExcPureFunctionCalled ( )
static

This exception is used in functions that may not be called (i.e. in pure functions) but could not be declared pure since the class is intended to be used anyway, even though the respective function may only be called if a derived class is used.

::ExceptionBase& StandardExceptions::ExcInvalidConstructorCall ( )
static

Used for constructors that are disabled. Examples are copy constructors and assignment operators of large objects, which are only allowed for empty objects.

::ExceptionBase& StandardExceptions::ExcNotInitialized ( )
static

This exception is used if some object is found uninitialized.

::ExceptionBase& StandardExceptions::ExcInvalidState ( )
static

The object is in a state not suitable for this operation.

::ExceptionBase& StandardExceptions::ExcImpossibleInDim ( int  arg1)
throw (errortext<< "Impossible in "<< arg1<< "d."
)
static

This exception is raised if a functionality is not possible in the given dimension. Mostly used to throw function calls in 1d.

The constructor takes a single int, denoting the dimension.

::ExceptionBase& StandardExceptions::ExcZero ( )
static

A number is zero, but it should not be here.

::ExceptionBase& StandardExceptions::ExcEmptyObject ( )
static

The object should have been filled with something before this member function is called.

::ExceptionBase& StandardExceptions::ExcDimensionMismatch ( std::size_t  arg1,
std::size_t  arg2 
)
throw (errortext<< "Dimension "<< arg1<< " not equal to "<< arg2
)
static

This exception is raised whenever the sizes of two objects were assumed to be equal, but were not.

Parameters to the constructor are the first and second size, both of type int.

::ExceptionBase& StandardExceptions::ExcDimensionMismatch2 ( int  arg1,
int  arg2,
int  arg3 
)
throw (errortext<< "Dimension "<< arg1<< " neither equal to "<< arg2<< " nor to "<< arg3
)
static

The first dimension should be either equal to the second or the third, but it is neither.

::ExceptionBase& StandardExceptions::ExcIndexRange ( int  arg1,
int  arg2,
int  arg3 
)
throw (errortext << "Index " << arg1 << " is not in [" << arg2 << ",
" << arg3 << "["
)
static

This exception is one of the most often used ones, and indicates that an index is not within the expected range. For example, you might try to access an element of a vector which does not exist.

The constructor takes three int, namely

  1. the violating index
  2. the lower bound
  3. the upper bound plus one
template<typename T >
::ExceptionBase& StandardExceptions::ExcIndexRangeType ( arg1,
arg2,
arg3 
)
throw (errortext << "Index " << arg1 << " is not in [" << arg2 << ",
" << arg3 << "["
)
static

This generic exception will allow(enforce) the user to specify the type of indices which adds type safety to the program.

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

A number is too small.

template<typename T >
::ExceptionBase& StandardExceptions::ExcLowerRangeType ( arg1,
arg2 
)
throw (errortext<< "Number "<< arg1<< " must be larger 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.

::ExceptionBase& StandardExceptions::ExcInvalidIterator ( )
static

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.

::ExceptionBase& StandardExceptions::ExcIteratorPastEnd ( )
static

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.

::ExceptionBase& StandardExceptions::ExcGhostsPresent ( )
static

Parallel vectors with ghost elements are read-only vectors.

::ExceptionBase& StandardExceptions::ExcScalarAssignmentOnlyForZeroValue ( )
static

Some of our numerical classes allow for setting alll 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.

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.

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

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

Subscriptor::DeclException2 ( ExcNoSubscriber  ,
char *  ,
char *  ,
<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<<  arg1 
)

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

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

Exception.

template<typename RT = void>
Threads::Task< RT >::DeclException0 ( ExcNoTask< RT >  )

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