*/
void
evaluate_all_convergence_rates(const RateMode rate_mode);
-
+
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException1 (ExcRateColumnAlreadyExists,
std::string,
<< "Rate column <" << arg1 << "> does already exist.");
+ //@}
};
* Value for no neighbor.
*/
static const unsigned int no_neighbor = deal_II_numbers::invalid_unsigned_int;
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Exception
<< "It is not possible to have a structural dimension of " << arg1
<< " to be larger than the space dimension of the surrounding"
<< " space " << arg2);
+ //@}
};
-
/**
* Flags describing the details of
* output in OpenDX format. At
* value.
*/
static unsigned int memory_consumption ();
-
+
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
* Exception
*/
DeclException0 (ExcNoPatches);
- /**
- * Exception
- */
- DeclException0 (ExcIO);
/**
* Exception
*/
<< "There was an error opening Tecplot file " << arg1
<< " for output");
-
+ //@}
private:
/**
* Class holding the data of one
*/
unsigned int memory_consumption () const;
- /**
- * Exception
- */
- DeclException0 (ExcInvalidState);
-
protected:
/**
* This is the abstract function
*/
namespace StandardExceptions
{
+ /**
+ * @addtogroup Exceptions
+ */
+ //@{
+
/**
* Exception denoting a division by
* zero.
*/
DeclException0 (ExcNotInitialized);
+ /**
+ * Exception
+ */
+ DeclException0 (ExcInvalidState);
+
/**
* This exception is raised if a
* functionality is not possible in
int, int,
<< "Dimension " << arg1 << " not equal to " << arg2);
+ /**
+ * Exception.
+ */
+ DeclException3 (ExcDimensionMismatch2,
+ int, int, int,
+ << "Dimension " << arg1 << " neither equal to " << arg2 << " nor to " << arg3);
+
/**
* This exception is one of the
* most often used ones, and
<< "Index " << arg1 << " is not in ["
<< arg2 << "," << arg3 << "[");
+ /**
+ * A number is too small.
+ */
+ DeclException2 (ExcLowerRange, int, int,
+ << "Number " << arg1
+ << " must be larger or equal " << arg2);
+
/**
* This exception indicates that
* the first argument should be an
* cases, this exception is thrown.
*/
DeclException0 (ExcScalarAssignmentOnlyForZeroValue);
+ //@}
}
*/
unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
- * Exception
+ * Number of components does not match.
*/
DeclException2 (ExcNumberOfComponents,
int, int,
int,
<< "The number of components of a function object must "
<< "at least be one, but you gave " << arg1);
+ //@}
};
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* value.
*/
unsigned int memory_consumption () const;
+
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Exception.
*/
DeclException0(ExcInvalidFormula);
-
+ //@}
private:
/**
* Function for differentiation.
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
virtual double laplacian (const Point<dim> &p,
const unsigned int component = 0) const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcInvalidArraySize);
-
+ //@}
private:
/**
* Stored Fourier coefficients
virtual double laplacian (const Point<dim> &p,
const unsigned int component = 0) const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcInvalidArraySize);
-
+ //@}
private:
/**
* Stored Fourier coefficients
unsigned int memory_consumption () const;
/**
- * Exception
+ * Exception.
*/
- DeclException0 (ExcNoFileStreamGiven);
+ DeclException0(ExcNoFileStreamGiven);
private:
*/
unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception.
*/
int, int,
<< "The values " << arg1 << " and " << arg2
<< " do not form a valid range.");
-
+ //@}
private:
/**
* Copy of the pattern that
*/
unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception.
*/
int,
<< "A comma was found at position " << arg1
<< " of your input string, but commas are not allowed here.");
-
+ //@}
private:
/**
* List of valid strings as
* object.
*/
unsigned int memory_consumption () const;
+
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Exception
DeclException1 (ExcConversionError,
std::string,
<< "Error when trying to convert the following string: " << arg1);
-
+ //@}
private:
/**
* Whatever is in a section:
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
double distance (const Point<dim> &p) const;
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Exception
* Exception
*/
DeclException0 (ExcInvalidConstructorCalled);
+ //@}
+
};
/*------------------------------- Inline functions: Point ---------------------------*/
* Print coefficients.
*/
void print(std::ostream& out) const;
-
+
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
* Exception
*/
DeclException0 (ExcVoidPolynomial);
-
+ //@}
protected:
/**
*/
unsigned int degree () const;
- /**
- * Exception.
- */
- DeclException3 (ExcDimensionMismatch2,
- int, int, int,
- << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
-
protected:
/**
QIterated (const Quadrature<1> &base_quadrature,
const unsigned int n_copies);
+ /** @addtogroup Exceptions
+ * @{ */
+
+
/**
* Exception
*/
int,
<< "The numbers of copies (" << arg1
<< ") of the quadrature formula is not valid.");
-
+ //@}
private:
/**
* Check whether the given
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003 by the deal authors
+// Copyright (C) 2003, 2004 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* details).
*/
static std::string get_quadrature_names();
-
+
+ /** @addtogroup Exceptions
+ * @{ */
+
+
/**
* Exception
*/
std::string,
<< arg1
<< " is not a valid quadrature name for a quadrature rule");
-
+ //@}
private:
/**
* This static function creates a
*/
unsigned int n_subscriptions () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception:
* Object may not be deleted, since
* when <tt>unsubscribe</tt> is called.
*/
DeclException0(ExcNotUsed);
-
+ //@}
private:
/**
* Write table as a tex file.
*/
void write_tex (std::ofstream &file) const;
-
+
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException1 (ExcUndefinedTexFormat,
std::string,
<< "<" << arg1 << "> is not a tex column format. Use l,c,r.");
-
+ //@}
protected:
/**
*/
static unsigned int memory_consumption ();
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
int,
<< "Given dimensions must be >= 1, but was " << arg1);
+ //@}
private:
/**
* Store the values in a simple
*/
unsigned int n () const;
- /**
- * Exception.
- */
- DeclException3 (ExcDimensionMismatch2,
- int, int, int,
- << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
-
private:
/**
*/
unsigned int n () const;
- /**
- * Exception.
- */
- DeclException3 (ExcDimensionMismatch2,
- int, int, int,
- << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
- /**
- * Exception
- */
- DeclException1 (ExcInvalidDim,
- int,
- << "The number of rows in this table must be equal to the "
- << "space dimension, but is " << arg1);
-
private:
/**
* Copy of the vector <tt>pols</tt> of
*/
void dump () {};
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception.
*/
int,
<< "In single-thread mode, other barrier sizes than 1 are not "
<< "useful. You gave " << arg1);
+
+ //@}
};
return thread_descriptor == t.thread_descriptor;
};
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcNoThread);
-
+ //@}
private:
/**
* Shared pointer to the object
polynomials (pols),
n_tensor_pols(get_n_tensor_pols(pols))
{
- Assert (pols.size() == dim, ExcInvalidDim(pols.size()));
+ Assert (pols.size() == dim, ExcDimensionMismatch(pols.size(), dim));
for (unsigned int d=0; d<dim; ++d)
Assert (pols[d].size() > 0,
ExcMessage ("The number of polynomials must be larger than zero "
/**
* Exception
*/
- DeclException0 (ExcMatrixNotSquare);
- /**
- * Exception
- */
DeclException0 (ExcWrongDimension);
/**
* Exception
Assert (uncondensed_struct.is_compressed() == true, ExcMatrixNotClosed());
Assert (condensed.get_sparsity_pattern().is_compressed() == true, ExcMatrixNotClosed());
Assert (uncondensed_struct.n_rows() == uncondensed_struct.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (condensed.n() == condensed.m(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (condensed.n()+n_constraints() == uncondensed.n(),
ExcWrongDimension());
Assert (sorted == true, ExcMatrixNotClosed());
Assert (sparsity.is_compressed() == true, ExcMatrixNotClosed());
Assert (sparsity.n_rows() == sparsity.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
double average_diagonal = 0;
for (unsigned int i=0; i<uncondensed.m(); ++i)
Assert (sorted == true, ExcMatrixNotClosed());
Assert (sparsity.is_compressed() == true, ExcMatrixNotClosed());
Assert (sparsity.n_rows() == sparsity.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
double average_diagonal = 0;
for (unsigned int b=0; b<uncondensed.n_block_rows(); ++b)
refine_and_coarsen_optimize (Triangulation<dim> &tria,
const Vector &criteria);
- /**
- * Exception
- */
- DeclException2 (ExcInvalidVectorSize,
- int, int,
- << "The given vector has " << arg1
- << " elements, but " << arg2 << " were expected.");
/**
* Exception
*/
Vector<double> &local_rhs,
const bool eliminate_columns);
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotBlockSquare);
/**
* Exception
*/
Assert (sorted == true, ExcMatrixNotClosed());
Assert (uncondensed.is_compressed() == true, ExcMatrixNotClosed());
Assert (uncondensed.n_rows() == uncondensed.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
// store for each line of the matrix
Assert (sorted == true, ExcMatrixNotClosed());
Assert (sparsity.is_compressed() == false, ExcMatrixIsClosed());
Assert (sparsity.n_rows() == sparsity.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
// store for each index whether it must be
// distributed or not. If entry is
{
Assert (sorted == true, ExcMatrixNotClosed());
Assert (sparsity.n_rows() == sparsity.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
// store for each index whether it must be
// distributed or not. If entry is
Assert (sorted == true, ExcMatrixNotClosed());
Assert (sparsity.is_compressed() == false, ExcMatrixIsClosed());
Assert (sparsity.n_rows() == sparsity.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
const BlockIndices &
index_mapping = sparsity.get_column_indices();
{
Assert (sorted == true, ExcMatrixNotClosed());
Assert (sparsity.n_rows() == sparsity.n_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (sparsity.n_block_rows() == sparsity.n_block_cols(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
Assert (sparsity.get_column_indices() == sparsity.get_row_indices(),
- ExcMatrixNotSquare());
+ ExcNotQuadratic());
const BlockIndices &
index_mapping = sparsity.get_column_indices();
const double threshold)
{
Assert (criteria.size() == tria.n_active_cells(),
- ExcInvalidVectorSize(criteria.size(), tria.n_active_cells()));
+ ExcDimensionMismatch(criteria.size(), tria.n_active_cells()));
Assert (criteria.is_non_negative (), ExcInvalidParameterValue());
// when all indicators are zero we
const double threshold)
{
Assert (criteria.size() == tria.n_active_cells(),
- ExcInvalidVectorSize(criteria.size(), tria.n_active_cells()));
+ ExcDimensionMismatch(criteria.size(), tria.n_active_cells()));
Assert (criteria.is_non_negative (), ExcInvalidParameterValue());
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active();
const Vector &criteria)
{
Assert (criteria.size() == tria.n_active_cells(),
- ExcInvalidVectorSize(criteria.size(), tria.n_active_cells()));
+ ExcDimensionMismatch(criteria.size(), tria.n_active_cells()));
Assert (criteria.is_non_negative (), ExcInvalidParameterValue());
// get an increasing order on
// vectors
Assert ((vec.size() == dofs->get_tria().n_active_cells()) ||
(vec.size() == dofs->n_dofs()),
- ExcInvalidVectorSize(vec.size(),
+ ExcDimensionMismatch(vec.size(),
dofs->n_dofs(),
dofs->get_tria().n_active_cells()));
Assert (matrix.n() == solution.size(),
ExcDimensionMismatch(matrix.n(), solution.size()));
Assert (matrix.n_block_rows() == matrix.n_block_cols(),
- ExcMatrixNotBlockSquare());
+ ExcNotQuadratic());
Assert (matrix.get_sparsity_pattern().get_row_indices() ==
matrix.get_sparsity_pattern().get_column_indices(),
- ExcMatrixNotBlockSquare());
+ ExcNotQuadratic());
Assert (matrix.get_sparsity_pattern().get_column_indices() ==
solution.get_block_indices (),
ExcBlocksDontMatch ());
# will put a list of the files that are included by a file in the documentation
# of that file.
-SHOW_INCLUDE_FILES = YES
+SHOW_INCLUDE_FILES = NO
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
BlockMatrixArray<MATRIX>::Subscriptor::subscribe;
BlockMatrixArray<MATRIX>::Subscriptor::unsubscribe;
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Multiple diagonal element.
unsigned int,
<< "Inverse diagonal entries may not be added in block "
<< arg1);
-
+ //@}
private:
/**
* Add all off-diagonal
#include <base/table.h>
#include <base/smartpointer.h>
#include <lac/block_indices.h>
+#include <lac/exceptions.h>
#include <cmath>
* this object.
*/
unsigned int block_column() const;
-
- /**
- * Exception
- */
- DeclException0 (ExcDereferenceEndIterator);
protected:
/**
*/
const_iterator end (const unsigned int r) const;
+ /** @addtogroup Exceptions
+ * @{ */
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotBlockSquare);
-
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotInitialized);
/**
* Exception
*/
int, int, int, int,
<< "The blocks [" << arg1 << ',' << arg2 << "] and ["
<< arg3 << ',' << arg4 << "] have differing column numbers.");
-
+ //@}
protected:
/**
* Release all memory and return
BlockMatrixBase<MatrixType>::diag_element (const unsigned int i) const
{
Assert (n_block_rows() == n_block_cols(),
- ExcMatrixNotBlockSquare());
+ ExcNotQuadratic());
const std::pair<unsigned int,unsigned int>
index = row_block_indices.global_to_local (i);
BlockMatrixBase<MatrixType> &
BlockMatrixBase<MatrixType>::operator *= (const value_type factor)
{
- Assert (n_block_cols() != 0, ExcMatrixNotInitialized());
- Assert (n_block_rows() != 0, ExcMatrixNotInitialized());
+ Assert (n_block_cols() != 0, ExcNotInitialized());
+ Assert (n_block_rows() != 0, ExcNotInitialized());
for (unsigned int r=0; r<n_block_rows(); ++r)
for (unsigned int c=0; c<n_block_cols(); ++c)
BlockMatrixBase<MatrixType> &
BlockMatrixBase<MatrixType>::operator /= (const value_type factor)
{
- Assert (n_block_cols() != 0, ExcMatrixNotInitialized());
- Assert (n_block_rows() != 0, ExcMatrixNotInitialized());
+ Assert (n_block_cols() != 0, ExcNotInitialized());
+ Assert (n_block_rows() != 0, ExcNotInitialized());
Assert (factor !=0, ExcDivideByZero());
const value_type factor_inv = 1. / factor;
typename BlockMatrixBase<MatrixType>::value_type
BlockMatrixBase<MatrixType>::matrix_norm_square (const BlockVectorType &v) const
{
- Assert (n_block_rows() == n_block_cols(),
- ExcMatrixNotBlockSquare());
+ Assert (n_block_rows() == n_block_cols(), ExcNotQuadratic());
Assert (v.n_blocks() == n_block_rows(),
ExcDimensionMismatch(v.n_blocks(), n_block_rows()));
#include <lac/block_vector.h>
#include <lac/sparse_matrix.h>
#include <lac/block_sparsity_pattern.h>
+#include <lac/exceptions.h>
+
#include <cmath>
*/
unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcBlockDimensionMismatch);
-
+ //@}
private:
/**
* Pointer to the block sparsity
const BlockVectorType &src,
const number omega) const
{
- Assert (this->n_block_rows() == this->n_block_cols(),
- typename BaseClass::ExcMatrixNotBlockSquare());
+ Assert (this->n_block_rows() == this->n_block_cols(), ExcNotQuadratic());
Assert (dst.n_blocks() == this->n_block_rows(),
ExcDimensionMismatch(dst.n_blocks(), this->n_block_rows()));
Assert (src.n_blocks() == this->n_block_cols(),
*/
void print (std::ostream &out) const;
+ /** @addtogroup Exceptions
+ * @{ */
- /**
- * Exception
- */
- DeclException1 (ExcInvalidSize,
- int,
- << "The number of blocks must be greater or equal to one, "
- << "but is " << arg1);
/**
* Exception
*/
* Exception
*/
DeclException0 (ExcInvalidConstructorCall);
+ //@}
protected:
*/
unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize);
+ //@}
};
/*@}*/
*/
Iterator & operator -= (const difference_type &d);
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception.
*/
* Exception.
*/
DeclException0 (ExcCastingAwayConstness);
-
+ //@}
private:
/**
* Pointer to the block
void equ (const value_type a, const BlockVectorBase& V,
const value_type b, const BlockVectorBase& W);
- /**
- * Exception
- */
- DeclException0 (ExcNotmatchingBlockSizes);
-
protected:
/**
* Pointer to the array of components.
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/subscriptor.h>
+#include <lac/exceptions.h>
template <typename number> class SparseMatrix;
*/
unsigned int n_nonzero_elements () const;
- /**
- * Exception
- */
- DeclException2 (ExcInvalidIndex,
- int, int,
- << "The given index " << arg1
- << " should be less than " << arg2 << ".");
- /**
- * Exception
- */
- DeclException0 (ExcInvalidConstructorCall);
- /**
- * Exception
- */
- DeclException0 (ExcNotSquare);
-
private:
/**
* Number of rows that this sparsity
CompressedSparsityPattern::add (const unsigned int i,
const unsigned int j)
{
- Assert (i<rows, ExcInvalidIndex(i,rows));
- Assert (j<cols, ExcInvalidIndex(j,cols));
+ Assert (i<rows, ExcIndexRange(i, 0, rows));
+ Assert (j<cols, ExcIndexRange(j, 0, cols));
lines[i].add (j);
}
--- /dev/null
+//---------------------------- exceptions.h ---------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//---------------------------- exceptions.h ---------------------------
+#ifndef __deal2__lac_exceptions_h
+#define __deal2__lac_exceptions_h
+
+#include <base/exceptions.h>
+
+namespace LACExceptions
+{
+ /**
+ * @addtogroup Exceptions
+ */
+ //@{
+
+ /**
+ * This function only works for
+ * quadratic matrices.
+ */
+ DeclException0 (ExcNotQuadratic);
+
+ /**
+ * An error of a PETSc function was
+ * encountered. Check the PETSc
+ * documentation for details.
+ */
+ DeclException1 (ExcPETScError,
+ int,
+ << "An error with error number " << arg1
+ << " occured while calling a PETSc function");
+
+ //@}
+}
+
+
+using namespace LACExceptions;
+
+
+#endif
/*---------------------------- fullmatrix.h ---------------------------*/
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/table.h>
+#include <lac/exceptions.h>
#include <vector>
Vector<number2> &src);
//@}
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcEmptyMatrix);
- /**
- * Exception
- */
- DeclException0 (ExcNotQuadratic);
+
/**
* Exception
*/
<< "Target region not in matrix: size in this direction="
<< arg1 << ", size of new matrix=" << arg2
<< ", offset=" << arg3);
- /**
- * Exception
- */
- DeclException1 (ExcNotImplemented,
- int,
- << "This function is not implemented for the given"
- << " matrix dimension " << arg1);
/**
* Exception
*/
DeclException0 (ExcSourceEqualsDestination);
-
+ //@}
+
friend class Accessor;
};
val[63] += s * srcval[63];
}
else
- Assert (false, ExcNotImplemented(n()));
+ Assert (false, ExcNotImplemented());
}
+this->el(2,0)*this->el(0,1)*this->el(1,2)
-this->el(2,0)*this->el(0,2)*this->el(1,1));
default:
- Assert (false,
- ExcNotImplemented(this->n_cols()));
+ Assert (false, ExcNotImplemented());
return 0;
};
}
#include <lac/block_matrix_base.h>
#include <lac/petsc_sparse_matrix.h>
#include <lac/petsc_block_vector.h>
+#include <lac/exceptions.h>
+
#include <cmath>
*/
using BlockMatrixBase<SparseMatrix>::clear;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
int, int, int, int,
<< "The blocks [" << arg1 << ',' << arg2 << "] and ["
<< arg3 << ',' << arg4 << "] have differing column numbers.");
+ //@}
};
#include <base/config.h>
-#include <base/exceptions.h>
#include <lac/petsc_vector.h>
#include <lac/petsc_parallel_block_vector.h>
#include <lac/block_indices.h>
#include <lac/block_vector_base.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
* to standard functions.
*/
void swap (BlockVector &v);
-
+
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize);
+ //@}
};
/*@}*/
#include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/subscriptor.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
/**
* Exception
*/
- DeclException1 (ExcPETScError,
- int,
- << "An error with error number " << arg1
- << " occured while calling a PETSc function");
- /**
- * Exception
- */
DeclException3 (ExcAccessToNonlocalRow,
int, int, int,
<< "You tried to access row " << arg1
* Exception
*/
DeclException0 (ExcSourceEqualsDestination);
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotSquare);
protected:
/**
#include <lac/block_matrix_base.h>
#include <lac/petsc_parallel_sparse_matrix.h>
#include <lac/petsc_parallel_block_vector.h>
+#include <lac/exceptions.h>
#include <cmath>
#ifdef DEAL_II_USE_PETSC
#include <base/config.h>
-#include <base/exceptions.h>
#include <lac/petsc_parallel_vector.h>
#include <lac/block_indices.h>
#include <lac/block_vector_base.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
#include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
*/
const MPI_Comm & get_mpi_communicator () const;
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Exception
*/
int, int,
<< "The number of local rows " << arg1
<< " must be larger than the total number of rows " << arg2);
- /**
- * Exception
- */
- DeclException2 (ExcInvalidSizes,
- int, int,
- << "The sizes " << arg1 << " and " << arg2
- << " are supposed to match, but don't.");
-
+ //@}
private:
/**
#define __deal2__petsc_parallel_vector_h
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/subscriptor.h>
+#include <lac/exceptions.h>
#include <lac/vector.h>
Vector::operator = (const ::Vector<number> &v)
{
Assert (size() == v.size(),
- ExcNonMatchingSizes (size(), v.size()));
+ ExcDimensionMismatch (size(), v.size()));
// the following isn't necessarily fast,
// but this is due to the fact that PETSc
#define __deal2__petsc_precondition_h
#include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
*/
virtual ~PreconditionerBase ();
- /**
- * Exception
- */
- DeclException1 (ExcPETScError,
- int,
- << "An error with error number " << arg1
- << " occured while calling a PETSc function");
protected:
/**
#define __deal2__petsc_solver_h
#include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
#include <lac/solver_control.h>
#ifdef DEAL_II_USE_PETSC
#include <base/config.h>
-#include <base/exceptions.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
#define __deal2__petsc_vector_h
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/subscriptor.h>
+#include <lac/exceptions.h>
#include <lac/vector.h>
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/subscriptor.h>
+#include <lac/exceptions.h>
#ifdef DEAL_II_USE_PETSC
*/
operator const Vec & () const;
- /**
- * Exception
- */
- DeclException1 (ExcPETScError,
- int,
- << "An error with error number " << arg1
- << " occured while calling a PETSc function");
- /**
- * Exception
- */
- DeclException2 (ExcNonMatchingSizes,
- int, int,
- << "The sizes " << arg1 << " and " << arg2
- << " are supposed to be equal, but are not.");
-
protected:
/**
* A generic vector object in
* have been computed.
*/
bool inverses_ready () const;
-
+
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
*/
DeclException0 (ExcInverseMatricesAlreadyExist);
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotSquare);
-
/**
* Exception
*/
DeclException0 (ExcDiagonalsNotStored);
-
+
+ //@}
+
/**
* Access to the inverse diagonal
* blocks.
const unsigned int bsize = parameters.block_size;
clear();
- Assert (M.m() == M.n(), ExcMatrixNotSquare());
+ Assert (M.m() == M.n(), ExcNotQuadratic());
A = &M;
Assert (bsize>0, ExcIndexRange(bsize, 1, M.m()));
Assert (A->m()%bsize==0, ExcWrongBlockSize(bsize, A->m()));
const unsigned int bsize = parameters.block_size;
clear();
- Assert (M.m() == M.n(), ExcMatrixNotSquare());
+ Assert (M.m() == M.n(), ExcNotQuadratic());
A = &M;
Assert (bsize>0, ExcIndexRange(bsize, 1, M.m()));
Assert (A->m()%bsize==0, ExcWrongBlockSize(bsize, A->m()));
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
static std::string get_precondition_names();
+ /** @addtogroup Exceptions
+ * @{ */
+
+
/**
* Exception.
*/
DeclException0 (ExcNoMatrixGivenToUse);
-
+ //@}
protected:
/**
const VECTOR &b,
const PRECONDITIONER &precondition);
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcPreconditionerNotDefinite);
-
+ //@}
protected:
/**
*/
virtual unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
double,
<< "The strengthening parameter " << arg1
<< " is not greater or equal than zero!");
-
- /**
- * Exception. Indicates violation
- * of a state rule().
- */
- DeclException0 (ExcInvalidState);
-
+ //@}
protected:
/**
* Copies the passed SparseMatrix
*/
Threads::ThreadMutex & get_synchronisation_lock () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception.
*/
* Exception
*/
DeclException0 (ExcMatrixNotSymmetric);
-
+ //@}
private:
/**
* Declare a local type which
*/
Threads::ThreadMutex & get_synchronisation_lock () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception.
*/
* Exception
*/
DeclException0 (ExcMatrixNotSymmetric);
-
+ //@}
private:
/**
* Store in the constructor
void solve (const SparseMatrix<double> &matrix,
Vector<double> &rhs_and_solution);
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotSquare);
/**
* Exception
*/
//---------------------------- sparse_ilu.h ---------------------------
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
// by the deal.II authors and Stephen "Cheffo" Kolaroff
//
// This file is subject to QPL and may not be distributed
#include <base/config.h>
#include <lac/sparse_matrix.h>
#include <lac/sparse_decomposition.h>
-
+#include <lac/exceptions.h>
/*! @addtogroup Preconditioners
*@{
*/
unsigned int memory_consumption () const;
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotSquare);
- /**
- * Exception
- */
- DeclException2 (ExcSizeMismatch,
- int, int,
- << "The sizes " << arg1 << " and " << arg2
- << " of the given objects do not match.");
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
double,
<< "The strengthening parameter " << arg1
<< " is not greater or equal than zero!");
+ //@}
};
/*@}*/
//---------------------------- sparse_ilu.templates.h ---------------------------
-// Copyright (C) 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
// by the deal.II authors and Stephen "Cheffo" Kolaroff
//
// This file is subject to QPL and may not be distributed
const double strengthen_diagonal)
{
SparseLUDecomposition<number>::decompose (matrix, strengthen_diagonal);
- Assert (matrix.m()==matrix.n(), ExcMatrixNotSquare ());
- Assert (this->m()==this->n(), ExcMatrixNotSquare ());
- Assert (matrix.m()==this->m(), ExcSizeMismatch(matrix.m(), this->m()));
+ Assert (matrix.m()==matrix.n(), ExcNotQuadratic ());
+ Assert (this->m()==this->n(), ExcNotQuadratic ());
+ Assert (matrix.m()==this->m(), ExcDimensionMismatch(matrix.m(), this->m()));
Assert (strengthen_diagonal>=0,
ExcInvalidStrengthening (strengthen_diagonal));
{
SparseLUDecomposition<number>::vmult (dst, src);
- Assert (dst.size() == src.size(), ExcSizeMismatch(dst.size(), src.size()));
- Assert (dst.size() == this->m(), ExcSizeMismatch(dst.size(), this->m()));
+ Assert (dst.size() == src.size(), ExcDimensionMismatch(dst.size(), src.size()));
+ Assert (dst.size() == this->m(), ExcDimensionMismatch(dst.size(), this->m()));
const unsigned int N=dst.size();
const unsigned int * const rowstart_indices
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/subscriptor.h>
#include <base/smartpointer.h>
#include <lac/sparsity_pattern.h>
+#include <lac/exceptions.h>
template<typename number> class Vector;
template<typename number> class FullMatrix;
*/
unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
/**
* Exception
*/
- DeclException0 (ExcMatrixNotInitialized);
- /**
- * Exception
- */
DeclException2 (ExcInvalidIndex,
int, int,
<< "The entry with index <" << arg1 << ',' << arg2
/**
* Exception
*/
- DeclException0 (ExcMatrixNotSquare);
- /**
- * Exception
- */
DeclException0 (ExcDifferentSparsityPatterns);
/**
* Exception
*/
- DeclException0 (ExcInvalidConstructorCall);
- /**
- * Exception
- */
DeclException2 (ExcIteratorRange,
int, int,
<< "The iterators denote a range of " << arg1
* Exception
*/
DeclException0 (ExcSourceEqualsDestination);
-
+ //@}
private:
/**
* Pointer to the sparsity
inline
unsigned int SparseMatrix<number>::m () const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
return cols->rows;
}
inline
unsigned int SparseMatrix<number>::n () const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
return cols->cols;
}
const unsigned int j,
const number value)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
// it is allowed to set elements of
// the matrix that are not part of
// the sparsity pattern, if the
const unsigned int j,
const number value)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
const unsigned int index = cols->operator()(i,j);
Assert ((index != SparsityPattern::invalid_entry) ||
SparseMatrix<number> &
SparseMatrix<number>::operator *= (const number factor)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
number *val_ptr = &val[0];
const number *const end_ptr = &val[cols->n_nonzero_elements()];
SparseMatrix<number> &
SparseMatrix<number>::operator /= (const number factor)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (factor !=0, ExcDivideByZero());
const number factor_inv = 1. / factor;
number SparseMatrix<number>::operator () (const unsigned int i,
const unsigned int j) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
AssertThrow (cols->operator()(i,j) != SparsityPattern::invalid_entry,
ExcInvalidIndex(i,j));
return val[cols->operator()(i,j)];
number SparseMatrix<number>::el (const unsigned int i,
const unsigned int j) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
const unsigned int index = cols->operator()(i,j);
if (index != SparsityPattern::invalid_entry)
inline
number SparseMatrix<number>::diag_element (const unsigned int i) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (cols->optimize_diagonal(), ExcMatrixNotSquare());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (cols->optimize_diagonal(), ExcNotQuadratic());
Assert (i<m(), ExcInvalidIndex1(i));
// Use that the first element in each
inline
number & SparseMatrix<number>::diag_element (const unsigned int i)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (cols->optimize_diagonal(), ExcMatrixNotSquare());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (cols->optimize_diagonal(), ExcNotQuadratic());
Assert (i<m(), ExcInvalidIndex1(i));
// Use that the first element in each
inline
number SparseMatrix<number>::global_entry (const unsigned int j) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
Assert (j < cols->n_nonzero_elements(),
ExcIndexRange (j, 0, cols->n_nonzero_elements()));
inline
number & SparseMatrix<number>::global_entry (const unsigned int j)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
Assert (j < cols->n_nonzero_elements(),
ExcIndexRange (j, 0, cols->n_nonzero_elements()));
{
Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
Assert (cols->compressed || cols->empty(), ExcNotCompressed());
if (val)
unsigned int
SparseMatrix<number>::n_nonzero_elements () const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
return cols->n_nonzero_elements ();
}
unsigned int
SparseMatrix<number>::n_actually_nonzero_elements () const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
return std::count_if(&val[0], &val[n_nonzero_elements ()],
std::bind2nd(std::not_equal_to<double>(), 0));
}
void
SparseMatrix<number>::symmetrize ()
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (cols->rows == cols->cols, ExcMatrixNotSquare());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (cols->rows == cols->cols, ExcNotQuadratic());
const unsigned int n_rows = m();
for (unsigned int row=0; row<n_rows; ++row)
SparseMatrix<number> &
SparseMatrix<number>::copy_from (const SparseMatrix<somenumber> &matrix)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols == matrix.cols, ExcDifferentSparsityPatterns());
std::copy (&matrix.val[0], &matrix.val[cols->n_nonzero_elements()],
SparseMatrix<number>::add_scaled (const number factor,
const SparseMatrix<somenumber> &matrix)
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols == matrix.cols, ExcDifferentSparsityPatterns());
number *val_ptr = &val[0];
SparseMatrix<number>::vmult (OutVector& dst,
const InVector& src) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(),src.size()));
SparseMatrix<number>::Tvmult (OutVector& dst,
const InVector& src) const
{
- Assert (val != 0, ExcMatrixNotInitialized());
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
Assert(n() == dst.size(), ExcDimensionMismatch(n(),dst.size()));
Assert(m() == src.size(), ExcDimensionMismatch(m(),src.size()));
SparseMatrix<number>::vmult_add (OutVector& dst,
const InVector& src) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(),src.size()));
SparseMatrix<number>::Tvmult_add (OutVector& dst,
const InVector& src) const
{
- Assert (val != 0, ExcMatrixNotInitialized());
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
Assert(n() == dst.size(), ExcDimensionMismatch(n(),dst.size()));
Assert(m() == src.size(), ExcDimensionMismatch(m(),src.size()));
somenumber
SparseMatrix<number>::matrix_norm_square (const Vector<somenumber>& v) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert(m() == v.size(), ExcDimensionMismatch(m(),v.size()));
Assert(n() == v.size(), ExcDimensionMismatch(n(),v.size()));
SparseMatrix<number>::matrix_scalar_product (const Vector<somenumber>& u,
const Vector<somenumber>& v) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert(m() == u.size(), ExcDimensionMismatch(m(),u.size()));
Assert(n() == v.size(), ExcDimensionMismatch(n(),v.size()));
template <typename number>
number SparseMatrix<number>::l1_norm () const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Vector<number> column_sums(n());
const unsigned int n_rows = m();
template <typename number>
number SparseMatrix<number>::linfty_norm () const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
const number *val_ptr = &val[cols->rowstart[0]];
const Vector<somenumber> &u,
const Vector<somenumber> &b) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size()));
Assert(m() == b.size(), ExcDimensionMismatch(m(),b.size()));
Assert(n() == u.size(), ExcDimensionMismatch(n(),u.size()));
const Vector<somenumber> &src,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
// you may want to take a look at the CVS
// archives to see the original version
// which is much clearer...
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
const Vector<somenumber>& src,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
const Vector<somenumber>& src,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
SparseMatrix<number>::SOR (Vector<somenumber>& dst,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
SparseMatrix<number>::TSOR (Vector<somenumber>& dst,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
const std::vector<unsigned int>& inverse_permutation,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
const std::vector<unsigned int>& inverse_permutation,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
const Vector<somenumber> &b,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
const Vector<somenumber> &b,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
SparseMatrix<number>::SSOR (Vector<somenumber>& dst,
const number om) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(),
typename SparsityPattern::ExcDiagonalNotOptimized());
const SparsityPattern &
SparseMatrix<number>::get_sparsity_pattern () const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
return *cols;
}
template <typename number>
void SparseMatrix<number>::print (std::ostream &out) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
for (unsigned int i=0; i<cols->rows; ++i)
for (unsigned int j=cols->rowstart[i]; j<cols->rowstart[i+1]; ++j)
const char* zero_string,
const double denominator) const
{
- Assert (cols != 0, ExcMatrixNotInitialized());
- Assert (val != 0, ExcMatrixNotInitialized());
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
unsigned int width = width_;
#include <base/config.h>
-#include <base/exceptions.h>
#include <base/subscriptor.h>
#include <base/smartpointer.h>
+#include <lac/exceptions.h>
#include <vector>
std::vector<unsigned int>& used_by_line,
const bool compute_by_line) const;
- /**
- * Exception for applying
- * inverse-type operators to
- * rectangular matrices.
- */
- DeclException0(ExcNoSquareMatrix);
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception for missing diagonal entry.
*/
int, int,
<< "An entry with index (" << arg1 << ',' << arg2
<< ") cannot be allocated.");
+ //@}
private:
/**
* Find an entry and return a
const Vector<somenumber> &src,
const number om) const
{
- Assert (m() == n(), ExcNoSquareMatrix());
+ Assert (m() == n(), ExcNotQuadratic());
Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
const Vector<somenumber> &src,
const number om) const
{
- Assert (m() == n(), ExcNoSquareMatrix());
+ Assert (m() == n(), ExcNotQuadratic());
Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
const Vector<somenumber> &src,
const number om) const
{
- Assert (m() == n(), ExcNoSquareMatrix());
+ Assert (m() == n(), ExcNotQuadratic());
Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
const Vector<somenumber> &src,
const number om) const
{
- Assert (m() == n(), ExcNoSquareMatrix());
+ Assert (m() == n(), ExcNotQuadratic());
Assert (dst.size() == n(), ExcDimensionMismatch (dst.size(), n()));
Assert (src.size() == n(), ExcDimensionMismatch (src.size(), n()));
*/
unsigned int memory_consumption () const;
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotSquare);
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
/**
* Exception
*/
- DeclException2 (ExcSizeMismatch,
- int, int,
- << "The sizes " << arg1 << " and " << arg2
- << " of the given objects do not match.");
- /**
- * Exception
- */
DeclException1 (ExcInvalidStrengthening,
double,
<< "The strengthening parameter " << arg1
DeclException2(ExcDecompositionNotStable, int, double,
<< "The diagonal element (" <<arg1<<","<<arg1<<") is "
<< arg2 <<", but must be positive");
-
+
+ //@}
private:
/**
* Values of the computed
SparseLUDecomposition<number>::decompose(matrix, strengthen_diagonal);
- Assert (matrix.m()==matrix.n(), ExcMatrixNotSquare ());
- Assert (this->m()==this->n(), ExcMatrixNotSquare ());
- Assert (matrix.m()==this->m(), ExcSizeMismatch(matrix.m(), this->m()));
+ Assert (matrix.m()==matrix.n(), ExcNotQuadratic ());
+ Assert (this->m()==this->n(), ExcNotQuadratic ());
+ Assert (matrix.m()==this->m(), ExcDimensionMismatch(matrix.m(), this->m()));
Assert (strengthen_diagonal>=0, ExcInvalidStrengthening (strengthen_diagonal));
inline number
SparseMIC<number>::get_rowsum (const unsigned int row) const
{
- Assert(this->m()==this->n(), ExcMatrixNotSquare());
+ Assert(this->m()==this->n(), ExcNotQuadratic());
// get start of this row. skip the
// diagonal element
const unsigned int * const column_numbers = this->get_sparsity_pattern().get_column_numbers();
const Vector<somenumber> &src) const
{
SparseLUDecomposition<number>::vmult (dst, src);
- Assert (dst.size() == src.size(), ExcSizeMismatch(dst.size(), src.size()));
- Assert (dst.size() == this->m(), ExcSizeMismatch(dst.size(), this->m()));
+ Assert (dst.size() == src.size(), ExcDimensionMismatch(dst.size(), src.size()));
+ Assert (dst.size() == this->m(), ExcDimensionMismatch(dst.size(), this->m()));
const unsigned int N=dst.size();
const unsigned int * const rowstart_indices = this->get_sparsity_pattern().get_rowstart_indices();
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
void vmult (Vector<number2> &dst,
const Vector<number2> &src) const;
- /**
- * Exception
- */
- DeclException0 (ExcMatrixNotSquare);
- /**
- * Exception
- */
- DeclException2 (ExcInvalidVectorSize,
- unsigned int, unsigned int,
- << "The dimensions of vectors and matrices, "
- << arg1 << " and " << arg2 << " do not match.");
-
protected:
/**
* Apply the inverses
n_threads (n_threads),
inverses (M.m(), 0)
{
- Assert (M.m() == M.n(), ExcMatrixNotSquare ());
- Assert (M.m() == selected.size(), ExcInvalidVectorSize(M.m(), selected.size()));
+ Assert (M.m() == M.n(), ExcNotQuadratic ());
+ Assert (M.m() == selected.size(), ExcDimensionMismatch(M.m(), selected.size()));
if (conserve_mem == false)
compute_inverses ();
const std::vector<bool> *const dof_mask) const
{
Assert (dst.size() == src.size(),
- ExcInvalidVectorSize(dst.size(), src.size()));
+ ExcDimensionMismatch(dst.size(), src.size()));
Assert (dst.size() == matrix->m(),
- ExcInvalidVectorSize(dst.size(), src.size()));
+ ExcDimensionMismatch(dst.size(), src.size()));
// first define an alias to the sparsity
// pattern of the matrix, since this
*/
void advance ();
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcInvalidIterator);
-
+ //@}
protected:
/**
* The sparsity pattern we operate on
*/
inline const unsigned int * get_column_numbers () const;
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Exception
*/
* Exception
*/
DeclException0 (ExcInvalidConstructorCall);
- /**
- * Exception
- */
- DeclException0 (ExcNotQuadratic);
/**
* This exception is thrown if
* the matrix does not follow the
int, int,
<< "The array has size " << arg1 << " but should have size "
<< arg2);
+ //@}
private:
/**
* Maximum number of rows that can
// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
unsigned int memory_consumption () const;
+ /** @addtogroup Exceptions
+ * @{ */
/**
* Exception.
*/
* Exception.
*/
DeclException0 (ExcInvalidCopyOperation);
-
+ //@}
private:
/**
* Name of the file to which data
unsigned int memory_consumption () const;
//@}
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* Exception
*/
DeclException0 (ExcEmptyVector);
-
+ //@}
protected:
/**
* for later use.
*/
virtual void free (const VECTOR * const) = 0;
+
+ /** @addtogroup Exceptions
+ * @{ */
+
/**
* No more available vectors.
*/
* this memory pool.
*/
DeclException0(ExcNotAllocatedHere);
+ //@}
};
//! Sample implementation using system memory management.
CompressedSparsityPattern::exists (const unsigned int i,
const unsigned int j) const
{
- Assert (i<rows, ExcInvalidIndex(i,rows));
- Assert (j<cols, ExcInvalidIndex(j,cols));
+ Assert (i<rows, ExcIndexRange(i, 0, rows));
+ Assert (j<cols, ExcIndexRange(j, 0, cols));
lines[i].flush_cache();
return std::binary_search (lines[i].entries.begin(),
void
CompressedSparsityPattern::symmetrize ()
{
- Assert (rows==cols, ExcNotSquare());
+ Assert (rows==cols, ExcNotQuadratic());
// loop over all elements presently
// in the sparsity pattern and add
PetscScalar
MatrixBase::diag_element (const unsigned int i) const
{
- Assert (m() == n(), ExcMatrixNotSquare());
+ Assert (m() == n(), ExcNotQuadratic());
// this doesn't seem to work any
// different than any other element
{
//TODO[WB]: The next PETSc release should contain a function MatMPI[B]AIJSetPreallocationCSR that we will want to use here. it may also be worthwhile to look at the functions MatPreallocateXXX in include/petscmat.h
Assert (local_rows_per_process.size() == local_columns_per_process.size(),
- ExcInvalidSizes (local_rows_per_process.size(),
+ ExcDimensionMismatch (local_rows_per_process.size(),
local_columns_per_process.size()));
Assert (this_process < local_rows_per_process.size(),
ExcInternalError());
const VectorBase &v)
{
Assert (size() == v.size(),
- ExcNonMatchingSizes (size(), v.size()));
+ ExcDimensionMismatch (size(), v.size()));
// there is no simple operation for this
// in PETSc. there are multiple ways to
const VectorBase &w)
{
Assert (size() == v.size(),
- ExcNonMatchingSizes (size(), v.size()));
+ ExcDimensionMismatch (size(), v.size()));
// there is no simple operation for this
// in PETSc. there are multiple ways to
SparseDirectUMFPACK::
factorize (const SparseMatrix<double> &matrix)
{
- Assert (matrix.m() == matrix.n(), ExcMatrixNotSquare())
+ Assert (matrix.m() == matrix.n(), ExcNotQuadratic())
clear ();