DeclException1 (ExcDimTooSmall,
int,
<< "Given dimensions must be >= 1, but was " << arg1);
- /**
- * Exception
- */
- DeclException1 (ExcInvalidIndex,
- int,
- << "Invalid index " << arg1);
/**
* Exception
*/
template <int dim>
inline
double Point<dim>::operator () (const unsigned int index) const {
- Assert (index<dim, ExcInvalidIndex (index));
+ Assert (index<dim, ExcIndexRange (index, 0, dim));
return values[index];
};
template <int dim>
inline
double & Point<dim>::operator () (const unsigned int index) {
- Assert (index<dim, ExcInvalidIndex (index));
+ Assert (index<dim, ExcIndexRange (index, 0, dim));
return values[index];
};
*/
const vector<double> & get_weights () const;
- /**
- * Exception
- */
- DeclException2 (ExcInvalidIndex,
- int, int,
- << "The index " << arg1
- << " is out of range, it should be less than " << arg2);
/**
* Exception
*/
const unsigned int subface_no,
vector<Point<dim> > &q_points);
- /**
- * Exception
- */
- DeclException2 (ExcInvalidIndex,
- int, int,
- << "The index " << arg1
- << " is out of range, it should be less than " << arg2);
/**
* Exception
*/
DeclException1 (ExcDimTooSmall,
int,
<< "Given dimensions must be >= 1, but was " << arg1);
-DeclException1 (ExcInvalidIndex,
- int,
- << "Invalid index " << arg1);
-
-
/**
inline
double Tensor<1,dim>::
operator [] (const unsigned int index) const {
- Assert (index<dim, ExcInvalidIndex (index));
+ Assert (index<dim, ExcIndexRange (index, 0, dim));
return values[index];
};
inline
double & Tensor<1,dim>::
operator [] (const unsigned int index) {
- Assert (index<dim, ExcInvalidIndex (index));
+ Assert (index<dim, ExcIndexRange (index, 0, dim));
return values[index];
};
template <int dim>
const Point<dim> & Quadrature<dim>::quad_point (const unsigned int i) const {
- Assert (i<n_quadrature_points, ExcInvalidIndex(i, n_quadrature_points));
+ Assert (i<n_quadrature_points, ExcIndexRange(i, 0, n_quadrature_points));
return quadrature_points[i];
};
template <int dim>
double Quadrature<dim>::weight (const unsigned int i) const {
- Assert (i<n_quadrature_points, ExcInvalidIndex(i, n_quadrature_points));
+ Assert (i<n_quadrature_points, ExcIndexRange(i, 0, n_quadrature_points));
return weights[i];
};
const unsigned int face_no,
vector<Point<2> > &q_points) {
const unsigned int dim=2;
- Assert (face_no<2*dim, ExcInvalidIndex (face_no, 2*dim));
+ Assert (face_no<2*dim, ExcIndexRange (face_no, 0, 2*dim));
for (unsigned int p=0; p<quadrature.n_quadrature_points; ++p)
switch (face_no)
const unsigned int face_no,
vector<Point<3> > &q_points) {
const unsigned int dim=3;
- Assert (face_no<2*dim, ExcInvalidIndex (face_no, 2*dim));
+ Assert (face_no<2*dim, ExcIndexRange (face_no, 0, 2*dim));
for (unsigned int p=0; p<quadrature.n_quadrature_points; ++p)
switch (face_no)
const unsigned int subface_no,
vector<Point<2> > &q_points) {
const unsigned int dim=2;
- Assert (face_no<2*dim, ExcInvalidIndex (face_no, 2*dim));
- Assert (subface_no<(1<<(dim-1)), ExcInvalidIndex (face_no, 1<<(dim-1)));
+ Assert (face_no<2*dim, ExcIndexRange (face_no, 0, 2*dim));
+ Assert (subface_no<(1<<(dim-1)), ExcIndexRange (face_no, 0, 1<<(dim-1)));
for (unsigned int p=0; p<quadrature.n_quadrature_points; ++p)
switch (face_no)
const unsigned int subface_no,
vector<Point<3> > &q_points) {
const unsigned int dim=3;
- Assert (face_no<2*dim, ExcInvalidIndex (face_no, 2*dim));
- Assert (subface_no<(1<<(dim-1)), ExcInvalidIndex (face_no, 1<<(dim-1)));
+ Assert (face_no<2*dim, ExcIndexRange (face_no, 0, 2*dim));
+ Assert (subface_no<(1<<(dim-1)), ExcIndexRange (face_no, 0, 1<<(dim-1)));
// for all faces and subfaces: first project