/** @addtogroup Exceptions
* @{ */
- /**
- * Exception
- */
- DeclException2 (ExcUnexpectedNumberOfDatasets,
- int, int,
- << "The number of data sets on this patch is " << arg1
- << ", but we expected " << arg2);
-
/**
* Exception
*/
<< "The number of points in this data set is " << arg1
<< ", but we expected " << arg2 << " in each space direction.");
/**
- * Exception
- */
- DeclException2 (ExcInvalidVectorNumber,
- int, int,
- << "The number " << arg1 << " of the vector to be used for "
- << "this information is invalid, since there are only "
- << arg2 << " data sets.");
- /**
- * Exception
- */
- DeclException2 (ExcUnexpectedNumberOfSubdivisions,
- int, int,
- << "The number of subdivisions is " << arg1
- << ", but we excepted " << arg2<< " for bicubic patch");
- /**
- * Exception
+ * An output function did not
+ * receive any patches for
+ * writing.
*/
DeclException0 (ExcNoPatches);
/**
-//---------------------------- function.h ---------------------------
+//---------------------------------------------------------------------------
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
+// Copyright (C) 1998 - 2005 by the deal 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.
//
-//---------------------------- function.h ---------------------------
+//---------------------------------------------------------------------------
#ifndef __deal2__function_h
#define __deal2__function_h
<< "number of components. However, here the left operand "
<< "has " << arg1 << " components, and the right operand "
<< arg2 << " components.");
- /**
- * Exception
- */
- DeclException1 (ExcInvalidNumberOfComponents,
- int,
- << "The number of components of a function object must "
- << "at least be one, but you gave " << arg1);
//@}
};
-//---------------------------- polynomial.h ---------------------------
+//---------------------------------------------------------------------------
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+// Copyright (C) 2000 - 2005 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.
//
-//---------------------------- polynomial.h ---------------------------
+//---------------------------------------------------------------------------
#ifndef __deal2__polynomial_h
#define __deal2__polynomial_h
*/
void print(std::ostream& out) const;
- /** @addtogroup Exceptions
- * @{ */
-
- /**
- * Exception
- */
- DeclException0 (ExcEmptyArray);
-
- /**
- * Exception
- */
- DeclException0 (ExcVoidPolynomial);
- //@}
protected:
/**
unsigned int
Polynomial<number>::degree () const
{
- Assert (coefficients.size()>0, ExcVoidPolynomial());
+ Assert (coefficients.size()>0, ExcEmptyObject());
return coefficients.size() - 1;
}
}
-//---------------------------- quadrature.h ---------------------------
+//---------------------------------------------------------------------------
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
+// Copyright (C) 1998 - 2005 by the deal 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.
//
-//---------------------------- quadrature.h ---------------------------
+//---------------------------------------------------------------------------
#ifndef __deal2__quadrature_h
#define __deal2__quadrature_h
/** @addtogroup Exceptions
* @{ */
-
-
- /**
- * Exception
- */
- DeclException0 (ExcSumOfWeightsNotOne);
/**
* Exception
*/
DeclException0 (ExcInvalidQuadratureFormula);
- /**
- * Exception
- */
- DeclException1 (ExcInvalidNumberOfCopies,
- int,
- << "The numbers of copies (" << arg1
- << ") of the quadrature formula is not valid.");
- //@}
private:
/**
* Check whether the given
for (unsigned int i=0;i<GeometryInfo<dim>::faces_per_cell;++i)
neighbors[i] = no_neighbor;
- Assert (dim<=spacedim, ExcInvalidCombinationOfDimensions(dim,spacedim));
+ Assert (dim<=spacedim, ExcIndexRange(dim,0,spacedim));
Assert (spacedim<=3, ExcNotImplemented());
}
const unsigned int n_subdivisions = patch->n_subdivisions;
Assert (patch->data.n_rows() == n_data_sets,
- ExcUnexpectedNumberOfDatasets (patch->data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patch->data.n_rows(), n_data_sets));
Assert (patch->data.n_cols() == (dim==1 ?
n_subdivisions+1 :
(dim==2 ?
const unsigned int n_subdivisions = patch->n_subdivisions;
Assert (patch->data.n_rows() == n_data_sets,
- ExcUnexpectedNumberOfDatasets (patch->data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patch->data.n_rows(), n_data_sets));
Assert (patch->data.n_cols() == (dim==1 ?
n_subdivisions+1 :
(dim==2 ?
const unsigned int n_subdivisions = patch->n_subdivisions;
Assert (patch->data.n_rows() == n_data_sets,
- ExcUnexpectedNumberOfDatasets (patch->data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patch->data.n_rows(), n_data_sets));
Assert (patch->data.n_cols() == (dim==1 ?
n_subdivisions+1 :
(dim==2 ?
const unsigned int n_subdivisions = patch->n_subdivisions;
Assert (patch->data.n_rows() == n_data_sets,
- ExcUnexpectedNumberOfDatasets (patch->data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patch->data.n_rows(), n_data_sets));
Assert (patch->data.n_cols() == (dim==1 ?
n_subdivisions+1 :
(dim==2 ?
const unsigned int n_subdivisions = patch->n_subdivisions;
Assert (patch->data.n_rows() == n_data_sets,
- ExcUnexpectedNumberOfDatasets (patch->data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patch->data.n_rows(), n_data_sets));
Assert (patch->data.n_cols() == (dim==1 ?
n_subdivisions+1 :
(dim==2 ?
}
else
{ // writing bicubic_patch
- Assert (n_subdivisions==3, ExcUnexpectedNumberOfSubdivisions(n_subdivisions,3));
+ Assert (n_subdivisions==3, ExcDimensionMismatch(n_subdivisions,3));
out << std::endl
<< "bicubic_patch {" << std::endl
<< " type 0" << std::endl
case 2:
Assert ((flags.height_vector < patch->data.n_rows()) ||
patch->data.n_rows() == 0,
- ExcInvalidVectorNumber (flags.height_vector,
- patch->data.n_rows()));
+ ExcIndexRange (flags.height_vector, 0,
+ patch->data.n_rows()));
heights[0] = patch->data.n_rows() != 0 ?
patch->data(flags.height_vector,i*(n_subdivisions+1) + j) * flags.z_scaling
: 0;
{
Assert ((flags.color_vector < patch->data.n_rows()) ||
patch->data.n_rows() == 0,
- ExcInvalidVectorNumber (flags.color_vector,
- patch->data.n_rows()));
+ ExcIndexRange (flags.color_vector, 0,
+ patch->data.n_rows()));
const double color_values[4]
= { patch->data.n_rows() != 0 ?
patch->data(flags.color_vector,i*(n_subdivisions+1) + j) : 1,
// other patches are made in
// write_gmv_reorder_data_vectors
Assert (n_data_sets == patches[0].data.n_rows(),
- ExcUnexpectedNumberOfDatasets (patches[0].data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patches[0].data.n_rows(), n_data_sets));
///////////////////////
// other patches are made in
// write_gmv_reorder_data_vectors
Assert (n_data_sets == patches[0].data.n_rows(),
- ExcUnexpectedNumberOfDatasets (patches[0].data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patches[0].data.n_rows(), n_data_sets));
// other patches are made in
// write_gmv_reorder_data_vectors
Assert (n_data_sets == patches[0].data.n_rows(),
- ExcUnexpectedNumberOfDatasets (patches[0].data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patches[0].data.n_rows(), n_data_sets));
// other patches are made in
// write_gmv_reorder_data_vectors
Assert (n_data_sets == patches[0].data.n_rows(),
- ExcUnexpectedNumberOfDatasets (patches[0].data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patches[0].data.n_rows(), n_data_sets));
///////////////////////
const unsigned int n_subdivisions = patch->n_subdivisions;
Assert (patch->data.n_rows() == n_data_sets,
- ExcUnexpectedNumberOfDatasets (patch->data.n_rows(), n_data_sets));
+ ExcDimensionMismatch (patch->data.n_rows(), n_data_sets));
Assert (patch->data.n_cols() == (dim==1 ?
n_subdivisions+1 :
(dim==2 ?
-//---------------------------- function.cc ---------------------------
+//---------------------------------------------------------------------------
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+// Copyright (C) 1998 - 2005 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.
//
-//---------------------------- function.cc ---------------------------
+//---------------------------------------------------------------------------
#include <base/function.h>
// errors later on (happened to me in fact
// :-)
Assert (n_components > 0,
- ExcInvalidNumberOfComponents(n_components));
+ ExcZero());
}
-//---------------------------- polynomial.cc -----------------------
+//---------------------------------------------------------------------------
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 2000 - 2005 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.
//
-//---------------------------- polynomial.cc ----------------------
+//---------------------------------------------------------------------------
#include <base/polynomial.h>
number
Polynomial<number>::value (const number x) const
{
- Assert (coefficients.size() > 0, ExcVoidPolynomial());
+ Assert (coefficients.size() > 0, ExcEmptyObject());
const unsigned int m=coefficients.size();
// Horner scheme
Polynomial<number>::value (const number x,
std::vector<number> &values) const
{
- Assert (coefficients.size() > 0, ExcVoidPolynomial());
- Assert (values.size() > 0, ExcEmptyArray());
+ Assert (coefficients.size() > 0, ExcEmptyObject());
+ Assert (values.size() > 0, ExcZero());
const unsigned int values_size=values.size();
-//---------------------------- quadrature.cc ---------------------------
+//---------------------------------------------------------------------------
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1998 - 2005 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.
//
-//---------------------------- quadrature.cc ---------------------------
+//---------------------------------------------------------------------------
#include <grid/geometry_info.h>
(base_quadrature.n_quadrature_points-1) * n_copies + 1 :
base_quadrature.n_quadrature_points * n_copies)
{
- Assert (n_copies >= 1, ExcInvalidNumberOfCopies(n_copies));
+ Assert (n_copies > 0, ExcZero());
if (!uses_both_endpoints(base_quadrature))
// we don't have to skip some
};
// scale the weight correctly
double_point_weight /= n_copies;
-
+//TODO:[WB] The following assertion looks strange. InternalError???
// make sure the base quadrature formula
// has only one quadrature point
// per end point
for (unsigned int i=0; i<this->n_quadrature_points; ++i)
sum_of_weights += this->weight(i);
Assert (std::fabs(sum_of_weights-1) < 1e-15,
- ExcSumOfWeightsNotOne());
+ ExcInternalError());
#endif
}