From 80420183328b448c4acc53f44f1942a33dbec17a Mon Sep 17 00:00:00 2001 From: guido Date: Tue, 20 Jul 1999 17:52:25 +0000 Subject: [PATCH] towards unification git-svn-id: https://svn.dealii.org/trunk@1609 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/point.h | 10 ++-------- deal.II/base/include/base/quadrature.h | 14 -------------- deal.II/base/include/base/tensor.h | 4 ++-- deal.II/base/include/base/tensor_base.h | 9 ++------- deal.II/base/source/quadrature.cc | 16 ++++++++-------- 5 files changed, 14 insertions(+), 39 deletions(-) diff --git a/deal.II/base/include/base/point.h b/deal.II/base/include/base/point.h index 1ed8336cad..8627c475f3 100644 --- a/deal.II/base/include/base/point.h +++ b/deal.II/base/include/base/point.h @@ -134,12 +134,6 @@ class Point : public Tensor<1,dim> { DeclException1 (ExcDimTooSmall, int, << "Given dimensions must be >= 1, but was " << arg1); - /** - * Exception - */ - DeclException1 (ExcInvalidIndex, - int, - << "Invalid index " << arg1); /** * Exception */ @@ -223,7 +217,7 @@ Point<3>::Point (const double x, const double y, const double z) { template inline double Point::operator () (const unsigned int index) const { - Assert (index::operator () (const unsigned int index) const { template inline double & Point::operator () (const unsigned int index) { - Assert (index & get_weights () const; - /** - * Exception - */ - DeclException2 (ExcInvalidIndex, - int, int, - << "The index " << arg1 - << " is out of range, it should be less than " << arg2); /** * Exception */ @@ -257,13 +250,6 @@ class QProjector { const unsigned int subface_no, vector > &q_points); - /** - * Exception - */ - DeclException2 (ExcInvalidIndex, - int, int, - << "The index " << arg1 - << " is out of range, it should be less than " << arg2); /** * Exception */ diff --git a/deal.II/base/include/base/tensor.h b/deal.II/base/include/base/tensor.h index c1249c3def..8a155b1f9f 100644 --- a/deal.II/base/include/base/tensor.h +++ b/deal.II/base/include/base/tensor.h @@ -220,7 +220,7 @@ inline Tensor & Tensor:: operator[] (const unsigned int i) { - Assert (i & Tensor:: operator[] (const unsigned int i) const { - Assert (i= 1, but was " << arg1); -DeclException1 (ExcInvalidIndex, - int, - << "Invalid index " << arg1); - - /** @@ -284,7 +279,7 @@ template inline double Tensor<1,dim>:: operator [] (const unsigned int index) const { - Assert (index inline double & Tensor<1,dim>:: operator [] (const unsigned int index) { - Assert (index & Quadrature<0>::quad_point (const unsigned int) const { template const Point & Quadrature::quad_point (const unsigned int i) const { - Assert (i::weight (const unsigned int) const { template double Quadrature::weight (const unsigned int i) const { - Assert (i::project_to_face (const Quadrature<1> &quadrature, const unsigned int face_no, vector > &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::project_to_face (const Quadrature<2> &quadrature, const unsigned int face_no, vector > &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::project_to_subface (const Quadrature<1> &quadrature, const unsigned int subface_no, vector > &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::project_to_subface (const Quadrature<2> &quadrature, const unsigned int subface_no, vector > &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 -- 2.39.5