From: wolf Date: Tue, 22 Jun 1999 15:31:05 +0000 (+0000) Subject: Check in a large patch to remove all error messages that the present snapshot of... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa4b81168a032f6778d6ca27afe0474b4ef0da96;p=dealii-svn.git Check in a large patch to remove all error messages that the present snapshot of gcc 2.95 produces, with exception of some places in histogram.cc where egcs 1.1.2 produces an internal compiler error on the syntactically correct code. Most of the changes fall into the following groups: - Rules for friends have been made stricter, it seems. Therefore, the declaration 'template <> friend class X;' to make X for the same dimension a friend is rejected because this is a partial specialization of X. Oh well, I liked that feature, but if that's the way things go... - Remove ExcInternalError from most classes, and use the one in exceptions.h instead. - Same for ExcInvalidIndex. - Add some template parameters to base classes where they are explicitely mentioned, as in constructor lists and calling of base classes. Previously they were implicitely deduced from the context. - Re-remove some 'typename' keywords where not a general template is involved, such as in DoFHandler<1>::cell_iterator. Where is used, the typename is still needed. - Explicitely scope some classes where they are derived from a base class and could not properly be found by gcc 2.95. - Some other smaller changes. git-svn-id: https://svn.dealii.org/trunk@1441 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/Todo b/deal.II/base/Todo index c20b24ad37..19e8a5eb97 100644 --- a/deal.II/base/Todo +++ b/deal.II/base/Todo @@ -11,3 +11,6 @@ Move the exceptions in the Tensor package (tensor_base.h and tensor.h) Think about the determinant function in the tensor package. Is it useful, can it be generalized? + +Put Tensor<1,dim>::array_size directly into the array type. At + present, egcs 1.1.2 chokes on that. diff --git a/deal.II/base/include/base/quadrature.h b/deal.II/base/include/base/quadrature.h index 6a17905eff..79bed6d693 100644 --- a/deal.II/base/include/base/quadrature.h +++ b/deal.II/base/include/base/quadrature.h @@ -40,7 +40,9 @@ * all functions are provided in the #quadrature.cc# file, but they will * throw exceptions if actually called. The only function which is allowed * to be called is the constructor taking one integer, which in this case - * ignores its parameter, and of course the destructor. + * ignores its parameter, and of course the destructor. Besides this, it is + * necessary to provide a class #Point<0># to make the compiler happy. This + * class also does nothing. * * @author Wolfgang Bangerth, 1998 */ diff --git a/deal.II/base/include/base/tensor.h b/deal.II/base/include/base/tensor.h index 04e12a164d..c1249c3def 100644 --- a/deal.II/base/include/base/tensor.h +++ b/deal.II/base/include/base/tensor.h @@ -170,10 +170,20 @@ class Tensor // /** * Help function for unroll. */ - void unroll_recursion(Vector & result, unsigned int& start_index) const; - - template<> - friend void Tensor::unroll_recursion(Vector &, unsigned&) const; + void unroll_recursion(Vector &result, + unsigned int &start_index) const; + + // make the following class a + // friend to this class. in principle, + // it would suffice if otherrank==rank+1, + // but then the compiler complains + // that this be an explicit specialization + // which is not what we want + // + // also, it would be sufficient to make + // the function unroll_loops a friend, + // but that seems to be impossible as well. + template friend class Tensor; }; diff --git a/deal.II/base/include/base/tensor_base.h b/deal.II/base/include/base/tensor_base.h index 61ca6bd0c4..4280d93ed0 100644 --- a/deal.II/base/include/base/tensor_base.h +++ b/deal.II/base/include/base/tensor_base.h @@ -59,12 +59,24 @@ class Tensor<1,dim> { */ static const unsigned int rank = 1; + /** + * Unnecessary variable, only used in + * the declaration of #array_type#. + * This variable should be omitted, + * but egcs1.1.2 chokes on that so + * we need it presently. + */ + static const unsigned int array_size = (dim>0 ? dim : 1); + /** * Declare an array type which can * be used to initialize statically * an object of this type. + * + * Use the same condition for #dim==0# + * as in the #TensorBase<1,dim># class. */ - typedef double array_type[dim]; + typedef double array_type[array_size]; /** * Constructor. Initialize all entries @@ -173,22 +185,35 @@ class Tensor<1,dim> { * index marches fastest. */ void unroll (Vector &result) const; - + protected: /** - * Store the values in a simple array. + * Store the values in a simple array. + * For #dim==0# store one element, because + * otherways the compiler would choke. + * We catch this case in the constructor + * to disallow the creation of such + * an object. */ - double values[dim]; + double values[dim>0 ? dim : 1]; /** * Help function for unroll. */ - void unroll_recursion (Vector & result, - unsigned int& start_index) const; - - template<> - friend void Tensor<2,dim>::unroll_recursion(Vector &, - unsigned&) const; + void unroll_recursion (Vector &result, + unsigned int &start_index) const; + + // make the following classes + // friends to this class. in principle, + // it would suffice if otherrank==2, + // but then the compiler complains + // that this be an explicit specialization + // which is not what we want + // + // also, it would be sufficient to make + // the function unroll_loops a friend, + // but that seems to be impossible as well. + template friend class Tensor; }; /** diff --git a/deal.II/deal.II/Make.global_options b/deal.II/deal.II/Make.global_options index de6c857597..c919e7a501 100644 --- a/deal.II/deal.II/Make.global_options +++ b/deal.II/deal.II/Make.global_options @@ -13,7 +13,7 @@ vpath %.a $D/deal.II/lib CXX = c++ INCLUDE = -I$D/deal.II/include -I$D/lac/include \ -I$D/base/include -CXXFLAGS.g= -ansi -DDEBUG -ggdb -Wall -W -pedantic -Wconversion \ +CXXFLAGS.g= -ansi -DDEBUG -ggdb -Wall -W -Wconversion \ -Winline -Woverloaded-virtual -fno-builtin\ -fno-vtable-thunks \ $(INCLUDE) diff --git a/deal.II/deal.II/Make_forward_declarations b/deal.II/deal.II/Make_forward_declarations index 79add620e4..04167c363f 100644 --- a/deal.II/deal.II/Make_forward_declarations +++ b/deal.II/deal.II/Make_forward_declarations @@ -65,7 +65,10 @@ sub parse_class_declarations { # we look for declarations, where after the name comes a colon # or an open-brace, maybe also a semicolon or just nothing - if (($rest =~ /^\s*[:\{;]/) || ($rest =~ /^\s*$/)) { + # + # the colon might be of an inheritance list, but we do not + # want it to come from a nested class declaration + if (($rest =~ /^\s*([\{;]|:[^:])/) || ($rest =~ /^\s*$/)) { $declaration = $basepart . " " . $name; # strip double spaces etc. $declaration =~ s/\s\s+/ /g; diff --git a/deal.II/deal.II/Todo b/deal.II/deal.II/Todo index f2cdbf86e3..1ffebc17c2 100644 --- a/deal.II/deal.II/Todo +++ b/deal.II/deal.II/Todo @@ -148,17 +148,13 @@ Look at the hyper-L and hyper-ball code in 3d. I suspect the cubes are The hypercube is fixed, however. -Let DoFHandler be derived from Subscriptor and let the DataOut object - subscribe to it. Same for FEValues and maybe some more classes. - - Change the vector in 'void DoFQuadAccessor::get_dof_indices( vector &dof_indices) const' in a vector and catch the Error dof_index==-1 inside of this function Remove that pseudo-template clutter in the lower parts of - dof_accessor.cc marked by comments. + dof_accessor.[templates.]cc marked by comments. Remove the flag -fno-vtable-thunks if egcs's bug is removed someday. diff --git a/deal.II/deal.II/include/dofs/dof_accessor.h b/deal.II/deal.II/include/dofs/dof_accessor.h index 5c9e04ac88..6b18d4b5a0 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.h @@ -86,16 +86,6 @@ class DoFAccessor { * Exception for child classes */ DeclException0 (ExcInvalidObject); - /** - * Exception for child classes - */ - DeclException3 (ExcInvalidIndex, - int, - int, - int, - << "Invalid index " << arg1 - << ", index must be between " << arg2 - << " and " << arg3 << "."); /** * Exception */ @@ -600,7 +590,7 @@ class DoFSubstructAccessor<1> : public DoFLineAccessor<1,CellAccessor<1> > { * class expects to get passed from the * iterator classes. */ - typedef typename DoFLineAccessor<1,CellAccessor<1> >::AccessorData AccessorData; + typedef DoFLineAccessor<1,CellAccessor<1> >::AccessorData AccessorData; /** * Constructor @@ -634,7 +624,7 @@ class DoFSubstructAccessor<2> : public DoFQuadAccessor<2,CellAccessor<2> > { * class expects to get passed from the * iterator classes. */ - typedef typename DoFQuadAccessor<2,CellAccessor<2> >::AccessorData AccessorData; + typedef DoFQuadAccessor<2,CellAccessor<2> >::AccessorData AccessorData; /** * Constructor @@ -669,7 +659,7 @@ class DoFSubstructAccessor<3> : public DoFHexAccessor<3,CellAccessor<3> > { * class expects to get passed from the * iterator classes. */ - typedef typename DoFQuadAccessor<3,CellAccessor<3> >::AccessorData AccessorData; + typedef DoFQuadAccessor<3,CellAccessor<3> >::AccessorData AccessorData; /** * Constructor diff --git a/deal.II/deal.II/include/dofs/dof_accessor.templates.h b/deal.II/deal.II/include/dofs/dof_accessor.templates.h index 4ef917f102..4f7dd75cce 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.templates.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.templates.h @@ -29,7 +29,7 @@ int DoFLineAccessor::dof_index (const unsigned int i) const { // and enough room was reserved Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (iselected_fe->dofs_per_line, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_line)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_line)); return dof_handler->levels[present_level] ->line_dofs[present_index*dof_handler->selected_fe->dofs_per_line+i]; @@ -44,9 +44,9 @@ int DoFLineAccessor::vertex_dof_index (const unsigned int vertex, const unsigned int i) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); - Assert (vertex<2, ExcInvalidIndex (i,0,2)); + Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (iselected_fe->dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); const unsigned int dof_number = (vertex_index(vertex) * dof_handler->selected_fe->dofs_per_vertex + @@ -117,7 +117,7 @@ int DoFQuadAccessor::dof_index (const unsigned int i) const { // and enough room was reserved Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (iselected_fe->dofs_per_quad, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_quad)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_quad)); return dof_handler->levels[present_level] ->quad_dofs[present_index*dof_handler->selected_fe->dofs_per_quad+i]; @@ -131,9 +131,9 @@ int DoFQuadAccessor::vertex_dof_index (const unsigned int vertex, const unsigned int i) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iselected_fe->dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); const unsigned int dof_number = (vertex_index(vertex) * dof_handler->selected_fe->dofs_per_vertex + @@ -174,7 +174,7 @@ template inline TriaIterator > > DoFQuadAccessor::line (const unsigned int i) const { - Assert (i<4, ExcInvalidIndex (i, 0, 4)); + Assert (i<4, ExcIndexRange (i, 0, 4)); return TriaIterator > > ( @@ -227,7 +227,7 @@ int DoFHexAccessor::dof_index (const unsigned int i) const { // and enough room was reserved Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (iselected_fe->dofs_per_hex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_hex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_hex)); return dof_handler->levels[present_level] ->hex_dofs[present_index*dof_handler->selected_fe->dofs_per_hex+i]; @@ -241,9 +241,9 @@ int DoFHexAccessor::vertex_dof_index (const unsigned int vertex, const unsigned int i) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); - Assert (vertex<8, ExcInvalidIndex (i,0,8)); + Assert (vertex<8, ExcIndexRange (i,0,8)); Assert (iselected_fe->dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); const unsigned int dof_number = (vertex_index(vertex) * dof_handler->selected_fe->dofs_per_vertex + @@ -305,7 +305,7 @@ template inline TriaIterator > > DoFHexAccessor::quad (const unsigned int i) const { - Assert (i<6, ExcInvalidIndex (i, 0, 6)); + Assert (i<6, ExcIndexRange (i, 0, 6)); return TriaIterator > > ( diff --git a/deal.II/deal.II/include/dofs/dof_handler.h b/deal.II/deal.II/include/dofs/dof_handler.h index 3406fd190c..8b9be0d746 100644 --- a/deal.II/deal.II/include/dofs/dof_handler.h +++ b/deal.II/deal.II/include/dofs/dof_handler.h @@ -347,10 +347,8 @@ class DoFDimensionInfo<3> { * * @author Wolfgang Bangerth, 1998 */ template -class DoFHandler - : - public Subscriptor, - public DoFDimensionInfo +class DoFHandler : public Subscriptor, + public DoFDimensionInfo { public: typedef typename DoFDimensionInfo::raw_line_iterator raw_line_iterator; @@ -1373,10 +1371,6 @@ class DoFHandler */ const Triangulation & get_tria () const; - /** - * Exception - */ - DeclException0 (ExcNotImplemented); /** * Exception */ diff --git a/deal.II/deal.II/include/dofs/mg_dof_accessor.h b/deal.II/deal.II/include/dofs/mg_dof_accessor.h index b3ccf0d712..774ef28cea 100644 --- a/deal.II/deal.II/include/dofs/mg_dof_accessor.h +++ b/deal.II/deal.II/include/dofs/mg_dof_accessor.h @@ -495,7 +495,7 @@ class MGDoFSubstructAccessor<1> : public MGDoFLineAccessor<1,CellAccessor<1> > * class expects to get passed from the * iterator classes. */ - typedef typename MGDoFLineAccessor<1,CellAccessor<1> >::AccessorData AccessorData; + typedef MGDoFLineAccessor<1,CellAccessor<1> >::AccessorData AccessorData; /** * Constructor diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index b4f87a409a..bccd934721 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -1407,10 +1407,6 @@ class FiniteElement : public FiniteElementBase /** * Exception */ - DeclException0 (ExcNotImplemented); - /** - * Exception - */ DeclException0 (ExcBoundaryFaceUsed); /** * Exception diff --git a/deal.II/deal.II/include/fe/fe_lib.dg.h b/deal.II/deal.II/include/fe/fe_lib.dg.h index 7705e145bb..d4137558a3 100644 --- a/deal.II/deal.II/include/fe/fe_lib.dg.h +++ b/deal.II/deal.II/include/fe/fe_lib.dg.h @@ -93,11 +93,6 @@ class FEDG_Q0 : public FEQ1Mapping { * about. */ const FullMatrix & restrict (const unsigned int) const; - - /** - * Exception - */ - DeclException0 (ExcNotImplemented); }; diff --git a/deal.II/deal.II/include/fe/fe_system.h b/deal.II/deal.II/include/fe/fe_system.h index 7722c06dae..180f711881 100644 --- a/deal.II/deal.II/include/fe/fe_system.h +++ b/deal.II/deal.II/include/fe/fe_system.h @@ -526,7 +526,7 @@ FESystem::base_element(unsigned int index) const template template FESystem::FESystem (const FE &fe, const unsigned int n_elements) : - FiniteElement (multiply_dof_numbers(fe, n_elements)), + FiniteElement (multiply_dof_numbers(fe, n_elements)), base_elements(1), component_to_base_table(n_components) { @@ -542,7 +542,7 @@ template FESystem::FESystem (const FE1 &fe1, const unsigned int n1, const FE2 &fe2, const unsigned int n2) : - FiniteElement (multiply_dof_numbers(fe1, n1, fe2, n2)), + FiniteElement (multiply_dof_numbers(fe1, n1, fe2, n2)), base_elements(2), component_to_base_table(n_components) { @@ -564,9 +564,9 @@ FESystem::FESystem (const FE1 &fe1, const unsigned int n1, const FE2 &fe2, const unsigned int n2, const FE3 &fe3, const unsigned int n3) : - FiniteElement (multiply_dof_numbers(fe1, n1, - fe2, n2, - fe3, n3)), + FiniteElement (multiply_dof_numbers(fe1, n1, + fe2, n2, + fe3, n3)), base_elements(3), component_to_base_table(n_components) { diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index e3d3fc3377..6f366d30c2 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -528,10 +528,6 @@ class FEValuesBase /** * Exception */ - DeclException0 (ExcNotImplemented); - /** - * Exception - */ DeclException0 (ExcInvalidUpdateFlag); protected: diff --git a/deal.II/deal.II/include/grid/tria_accessor.h b/deal.II/deal.II/include/grid/tria_accessor.h index a4b780be7a..716762ba86 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.h +++ b/deal.II/deal.II/include/grid/tria_accessor.h @@ -237,9 +237,9 @@ class TriaAccessor { */ Triangulation *tria; - template friend class TriaRawIterator; - template friend class TriaIterator; - template friend class TriaActiveIterator; + template friend class TriaRawIterator; + template friend class TriaIterator; + template friend class TriaActiveIterator; }; @@ -560,8 +560,7 @@ class LineAccessor : public TriaAccessor { /** * Declare some friends. */ - template friend class TriaRawIterator >; - template <> friend class TriaRawIterator<1,CellAccessor<1> >; + template friend class TriaRawIterator; }; @@ -917,8 +916,7 @@ class QuadAccessor : public TriaAccessor { /** * Declare some friends. */ - template friend class TriaRawIterator >; - template <> friend class TriaRawIterator<2,CellAccessor<2> >; + template friend class TriaRawIterator; }; @@ -1276,8 +1274,7 @@ class HexAccessor : public TriaAccessor { /** * Declare some friends. */ - template friend class TriaRawIterator >; - template <> friend class TriaRawIterator<3,CellAccessor<3> >; + template friend class TriaRawIterator; }; @@ -1323,7 +1320,7 @@ class TriaSubstructAccessor<1> : public LineAccessor<1> { * Propagate the AccessorData type * into the present class. */ - typedef typename LineAccessor<1>::AccessorData AccessorData; + typedef LineAccessor<1>::AccessorData AccessorData; /** * Constructor */ @@ -1356,7 +1353,7 @@ class TriaSubstructAccessor<2> : public QuadAccessor<2> { * Propagate the AccessorData type * into the present class. */ - typedef typename QuadAccessor<2>::AccessorData AccessorData; + typedef QuadAccessor<2>::AccessorData AccessorData; /** * Constructor */ @@ -1390,7 +1387,7 @@ class TriaSubstructAccessor<3> : public HexAccessor<3> { * Propagate the AccessorData type * into the present class. */ - typedef typename HexAccessor<3>::AccessorData AccessorData; + typedef HexAccessor<3>::AccessorData AccessorData; /** * Constructor diff --git a/deal.II/deal.II/include/grid/tria_accessor.templates.h b/deal.II/deal.II/include/grid/tria_accessor.templates.h index 3bb7d42824..d878540c4d 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.templates.h +++ b/deal.II/deal.II/include/grid/tria_accessor.templates.h @@ -145,7 +145,7 @@ template inline TriaIterator > LineAccessor::child (const unsigned int i) const { - Assert (i<2, ExcInvalidIndex(i,0,1)); + Assert (i<2, ExcIndexRange(i,0,2)); TriaIterator > q (tria, present_level+1, child_index (i)); @@ -162,7 +162,7 @@ template inline int LineAccessor::child_index (unsigned int i) const { - Assert (i<2, ExcInvalidIndex(i,0,1)); + Assert (i<2, ExcIndexRange(i,0,2)); return tria->levels[present_level]->lines.children[present_index]+i; }; @@ -313,7 +313,7 @@ template inline unsigned int QuadAccessor::line_index (unsigned int i) const { - Assert (i<4, ExcInvalidIndex(i,0,3)); + Assert (i<4, ExcIndexRange(i,0,4)); return tria->levels[present_level]->quads.quads[present_index].line(i); }; @@ -324,7 +324,7 @@ template inline TriaIterator > QuadAccessor::child (const unsigned int i) const { - Assert (i<4, ExcInvalidIndex(i,0,3)); + Assert (i<4, ExcIndexRange(i,0,4)); TriaIterator > q (tria, present_level+1, child_index (i)); @@ -340,7 +340,7 @@ QuadAccessor::child (const unsigned int i) const { template inline int QuadAccessor::child_index (unsigned int i) const { - Assert (i<4, ExcInvalidIndex(i,0,3)); + Assert (i<4, ExcIndexRange(i,0,4)); return tria->levels[present_level]->quads.children[present_index]+i; }; @@ -476,7 +476,7 @@ inline TriaIterator > HexAccessor::line (const unsigned int i) const { Assert (used(), ExcCellNotUsed()); - Assert (i<12, ExcInvalidIndex (i,0,11)); + Assert (i<12, ExcIndexRange (i,0,12)); if (i<4) return quad(0)->line(i); @@ -495,7 +495,7 @@ HexAccessor::line (const unsigned int i) const { case 11: return quad(4)->line(3); }; - Assert (false, ExcInvalidIndex(i,0,11)); + Assert (false, ExcIndexRange(i,0,12)); return TriaIterator >(tria, -1, -1, 0); }; @@ -521,7 +521,7 @@ template inline unsigned int HexAccessor::line_index (unsigned int i) const { - Assert (i<12, ExcInvalidIndex(i,0,11)); + Assert (i<12, ExcIndexRange(i,0,12)); if (i<4) return quad(0)->line_index(i); @@ -540,7 +540,7 @@ HexAccessor::line_index (unsigned int i) const { case 11: return quad(4)->line_index(3); }; - Assert (false, ExcInvalidIndex(i,0,11)); + Assert (false, ExcIndexRange(i,0,12)); return 0; }; @@ -550,7 +550,7 @@ template inline unsigned int HexAccessor::quad_index (unsigned int i) const { - Assert (i<6, ExcInvalidIndex(i,0,5)); + Assert (i<6, ExcIndexRange(i,0,6)); return tria->levels[present_level]->hexes.hexes[present_index].quad(i); }; @@ -561,7 +561,7 @@ template inline TriaIterator > HexAccessor::child (const unsigned int i) const { - Assert (i<6, ExcInvalidIndex(i,0,5)); + Assert (i<6, ExcIndexRange(i,0,6)); TriaIterator > q (tria, present_level+1, child_index (i)); @@ -577,7 +577,7 @@ HexAccessor::child (const unsigned int i) const { template inline int HexAccessor::child_index (unsigned int i) const { - Assert (i<8, ExcInvalidIndex(i,0,7)); + Assert (i<8, ExcIndexRange(i,0,8)); return tria->levels[present_level]->hexes.children[present_index]+i; }; diff --git a/deal.II/deal.II/include/grid/tria_iterator.h b/deal.II/deal.II/include/grid/tria_iterator.h index c040ab8f3e..1b77d9b289 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.h +++ b/deal.II/deal.II/include/grid/tria_iterator.h @@ -472,15 +472,17 @@ class TriaRawIterator : public bidirectional_iterator { * friends of this class. This is * necessary for the implementation of * conversion constructors. + * + * In fact, we would not need them to + * be friends if they were for different + * dimensions, but the compiler dislikes + * giving a fixed dimension and variable + * accessor since then it says that would + * be a artial specialization. */ - template - friend class TriaRawIterator; - - template - friend class TriaIterator; - - template - friend class TriaActiveIterator; + template friend class TriaRawIterator; + template friend class TriaIterator; + template friend class TriaActiveIterator; }; diff --git a/deal.II/deal.II/include/multigrid/mg_dof_accessor.h b/deal.II/deal.II/include/multigrid/mg_dof_accessor.h index b3ccf0d712..774ef28cea 100644 --- a/deal.II/deal.II/include/multigrid/mg_dof_accessor.h +++ b/deal.II/deal.II/include/multigrid/mg_dof_accessor.h @@ -495,7 +495,7 @@ class MGDoFSubstructAccessor<1> : public MGDoFLineAccessor<1,CellAccessor<1> > * class expects to get passed from the * iterator classes. */ - typedef typename MGDoFLineAccessor<1,CellAccessor<1> >::AccessorData AccessorData; + typedef MGDoFLineAccessor<1,CellAccessor<1> >::AccessorData AccessorData; /** * Constructor diff --git a/deal.II/deal.II/include/numerics/data_io.h b/deal.II/deal.II/include/numerics/data_io.h index 3ed4292710..2fcea190ab 100644 --- a/deal.II/deal.II/include/numerics/data_io.h +++ b/deal.II/deal.II/include/numerics/data_io.h @@ -139,10 +139,6 @@ class DataIn { */ void read_ucd (istream &); - /** - * Exception - */ - DeclException0 (ExcNotImplemented); /** * Exception */ @@ -571,10 +567,6 @@ class DataOut { /** * Exception */ - DeclException0 (ExcNotImplemented); - /** - * Exception - */ DeclException0 (ExcNoDoFHandlerSelected); /** * Exception diff --git a/deal.II/deal.II/include/numerics/error_estimator.h b/deal.II/deal.II/include/numerics/error_estimator.h index beafcd86b7..85999c4569 100644 --- a/deal.II/deal.II/include/numerics/error_estimator.h +++ b/deal.II/deal.II/include/numerics/error_estimator.h @@ -184,15 +184,6 @@ class KellyErrorEstimator { Vector &error, const Function *coefficient = 0, const unsigned int selected_component = 0); - - /** - * Exception - */ - DeclException0 (ExcNotImplemented); - /** - * Exception - */ - DeclException0 (ExcInternalError); /** * Exception */ diff --git a/deal.II/deal.II/include/numerics/matrices.h b/deal.II/deal.II/include/numerics/matrices.h index 2917c41584..fb22ee3962 100644 --- a/deal.II/deal.II/include/numerics/matrices.h +++ b/deal.II/deal.II/include/numerics/matrices.h @@ -307,16 +307,6 @@ class MatrixCreator static void create_interpolation_matrix(const FiniteElement &high, const FiniteElement &low, FullMatrix& result); - - - /** - * Exception - */ - DeclException0 (ExcNotImplemented); - /** - * Exception - */ - DeclException0 (ExcInternalError); }; diff --git a/deal.II/deal.II/include/numerics/solution_transfer.h b/deal.II/deal.II/include/numerics/solution_transfer.h index 65c1c5e24c..36e5939550 100644 --- a/deal.II/deal.II/include/numerics/solution_transfer.h +++ b/deal.II/deal.II/include/numerics/solution_transfer.h @@ -308,11 +308,6 @@ class SolutionTransfer int, int, << "The size of the vector is " << arg1 << "although it should be " << arg2 << "."); - - /** - * Exception - */ - DeclException0(ExcInternalError); private: diff --git a/deal.II/deal.II/include/numerics/time_dependent.h b/deal.II/deal.II/include/numerics/time_dependent.h index 72190f04ba..ca52e70303 100644 --- a/deal.II/deal.II/include/numerics/time_dependent.h +++ b/deal.II/deal.II/include/numerics/time_dependent.h @@ -895,10 +895,6 @@ class TimeStepBase : public Subscriptor */ double get_forward_timestep () const; - /** - * Exception - */ - DeclException0 (ExcInternalError); /** * Exception */ @@ -1385,10 +1381,6 @@ struct TimeStepBase_Tria::Flags DeclException1 (ExcInvalidParameter, int, << "The parameter " << arg1 << " has an invalid value."); - /** - * Exception - */ - DeclException0 (ExcInternalError); }; diff --git a/deal.II/deal.II/include/numerics/vectors.h b/deal.II/deal.II/include/numerics/vectors.h index 315d5b8e74..eff97cd674 100644 --- a/deal.II/deal.II/include/numerics/vectors.h +++ b/deal.II/deal.II/include/numerics/vectors.h @@ -441,10 +441,6 @@ class VectorTools // const NormType &norm); - /** - * Exception - */ - DeclException0 (ExcNotImplemented); /** * Exception */ diff --git a/deal.II/deal.II/source/dofs/dof_accessor.cc b/deal.II/deal.II/source/dofs/dof_accessor.cc index 33787933cd..ab4c0f38f5 100644 --- a/deal.II/deal.II/source/dofs/dof_accessor.cc +++ b/deal.II/deal.II/source/dofs/dof_accessor.cc @@ -33,7 +33,7 @@ void DoFLineAccessor::set_dof_index (const unsigned int i, // and enough room was reserved Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (iselected_fe->dofs_per_line, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_line)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_line)); dof_handler->levels[present_level] ->line_dofs[present_index*dof_handler->selected_fe->dofs_per_line+i] = index; @@ -48,9 +48,9 @@ void DoFLineAccessor::set_vertex_dof_index (const unsigned int ve const int index) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); - Assert (vertex<2, ExcInvalidIndex (i,0,2)); + Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (iselected_fe->dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); const unsigned int dof_number = (vertex_index(vertex) * dof_handler->selected_fe->dofs_per_vertex + @@ -126,7 +126,7 @@ void DoFQuadAccessor::set_dof_index (const unsigned int i, // and enough room was reserved Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (iselected_fe->dofs_per_quad, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_quad)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_quad)); dof_handler->levels[present_level] ->quad_dofs[present_index*dof_handler->selected_fe->dofs_per_quad+i] = index; @@ -140,9 +140,9 @@ void DoFQuadAccessor::set_vertex_dof_index (const unsigned int ve const int index) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iselected_fe->dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); const unsigned int dof_number = (vertex_index(vertex) * dof_handler->selected_fe->dofs_per_vertex + @@ -221,7 +221,7 @@ void DoFHexAccessor::set_dof_index (const unsigned int i, // and enough room was reserved Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (iselected_fe->dofs_per_hex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_hex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_hex)); dof_handler->levels[present_level] ->hex_dofs[present_index*dof_handler->selected_fe->dofs_per_hex+i] = index; @@ -235,9 +235,9 @@ void DoFHexAccessor::set_vertex_dof_index (const unsigned int ver const int index) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); - Assert (vertex<8, ExcInvalidIndex (i,0,8)); + Assert (vertex<8, ExcIndexRange (i,0,8)); Assert (iselected_fe->dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->selected_fe->dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); const unsigned int dof_number = (vertex_index(vertex) * dof_handler->selected_fe->dofs_per_vertex + diff --git a/deal.II/deal.II/source/dofs/mg_dof_accessor.cc b/deal.II/deal.II/source/dofs/mg_dof_accessor.cc index d6fd3b0b24..2807fd47e1 100644 --- a/deal.II/deal.II/source/dofs/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/dofs/mg_dof_accessor.cc @@ -27,7 +27,7 @@ MGDoFLineAccessor::MGDoFLineAccessor (Triangulation *tria, const int index, const AccessorData *local_data) : MGDoFAccessor (local_data), - DoFLineAccessor(tria,level,index,local_data) {}; + DoFLineAccessor(tria,level,index,local_data) {}; @@ -39,7 +39,7 @@ int MGDoFLineAccessor::mg_dof_index (const unsigned int i) const // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_line, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_line)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line)); return mg_dof_handler->mg_levels[present_level] ->line_dofs[present_index*dof_handler->get_fe().dofs_per_line+i]; @@ -58,7 +58,7 @@ void MGDoFLineAccessor::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_line, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_line)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line)); mg_dof_handler->mg_levels[present_level] ->line_dofs[present_index*dof_handler->get_fe().dofs_per_line+i] = index; @@ -73,9 +73,9 @@ int MGDoFLineAccessor::mg_vertex_dof_index (const unsigned int ve Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<2, ExcInvalidIndex (i,0,2)); + Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .get_index (present_level, i, dof_handler->get_fe().dofs_per_vertex)); @@ -90,9 +90,9 @@ void MGDoFLineAccessor::set_mg_vertex_dof_index (const unsigned i Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<2, ExcInvalidIndex (i,0,2)); + Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); @@ -142,7 +142,7 @@ MGDoFLineAccessor::child (const unsigned int i) const { template void MGDoFLineAccessor::copy_from (const MGDoFLineAccessor &a) { - DoFLineAccessor::copy_from (a); + DoFLineAccessor::copy_from (a); set_mg_dof_handler (a.mg_dof_handler); }; @@ -157,7 +157,7 @@ MGDoFQuadAccessor::MGDoFQuadAccessor (Triangulation *tria, const int index, const AccessorData *local_data) : MGDoFAccessor (local_data), - DoFQuadAccessor(tria,level,index,local_data) {}; + DoFQuadAccessor(tria,level,index,local_data) {}; @@ -170,7 +170,7 @@ int MGDoFQuadAccessor::mg_dof_index (const unsigned int i) const // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_quad, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_quad)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad)); return mg_dof_handler->mg_levels[present_level] ->quad_dofs[present_index*dof_handler->get_fe().dofs_per_quad+i]; @@ -187,7 +187,7 @@ void MGDoFQuadAccessor::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_quad, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_quad)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad)); mg_dof_handler->mg_levels[present_level] ->quad_dofs[present_index*dof_handler->get_fe().dofs_per_quad+i] = index; @@ -202,9 +202,9 @@ int MGDoFQuadAccessor::mg_vertex_dof_index (const unsigned int ve Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .get_index (present_level, i, dof_handler->get_fe().dofs_per_vertex)); @@ -219,9 +219,9 @@ void MGDoFQuadAccessor::set_mg_vertex_dof_index (const unsigned i Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); @@ -259,7 +259,7 @@ MGDoFQuadAccessor::get_mg_dof_indices (vector &dof_indices) template TriaIterator > > MGDoFQuadAccessor::line (const unsigned int i) const { - Assert (i<4, ExcInvalidIndex (i, 0, 4)); + Assert (i<4, ExcIndexRange (i, 0, 4)); return TriaIterator > > ( @@ -292,7 +292,7 @@ MGDoFQuadAccessor::child (const unsigned int i) const { template void MGDoFQuadAccessor::copy_from (const MGDoFQuadAccessor &a) { - DoFQuadAccessor::copy_from (a); + DoFQuadAccessor::copy_from (a); set_mg_dof_handler (a.mg_dof_handler); }; @@ -307,7 +307,7 @@ MGDoFHexAccessor::MGDoFHexAccessor (Triangulation *tria, const int index, const AccessorData *local_data) : MGDoFAccessor (local_data), - DoFHexAccessor(tria,level,index,local_data) {}; + DoFHexAccessor(tria,level,index,local_data) {}; @@ -320,7 +320,7 @@ int MGDoFHexAccessor::mg_dof_index (const unsigned int i) const { // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_hex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_hex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex)); return mg_dof_handler->mg_levels[present_level] ->hex_dofs[present_index*dof_handler->get_fe().dofs_per_hex+i]; @@ -337,7 +337,7 @@ void MGDoFHexAccessor::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_hex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_hex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex)); mg_dof_handler->mg_levels[present_level] ->hex_dofs[present_index*dof_handler->get_fe().dofs_per_hex+i] = index; @@ -352,9 +352,9 @@ int MGDoFHexAccessor::mg_vertex_dof_index (const unsigned int ver Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<8, ExcInvalidIndex (i,0,8)); + Assert (vertex<8, ExcIndexRange (i,0,8)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .get_index (present_level, i, dof_handler->get_fe().dofs_per_vertex)); @@ -369,9 +369,9 @@ void MGDoFHexAccessor::set_mg_vertex_dof_index (const unsigned in Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); @@ -414,7 +414,7 @@ MGDoFHexAccessor::get_mg_dof_indices (vector &dof_indices) c template TriaIterator > > MGDoFHexAccessor::line (const unsigned int i) const { - Assert (i<12, ExcInvalidIndex (i, 0, 12)); + Assert (i<12, ExcIndexRange (i, 0, 12)); return TriaIterator > > ( @@ -430,7 +430,7 @@ MGDoFHexAccessor::line (const unsigned int i) const { template TriaIterator > > MGDoFHexAccessor::quad (const unsigned int i) const { - Assert (i<12, ExcInvalidIndex (i, 0, 6)); + Assert (i<12, ExcIndexRange (i, 0, 6)); return TriaIterator > > ( @@ -463,7 +463,7 @@ MGDoFHexAccessor::child (const unsigned int i) const { template void MGDoFHexAccessor::copy_from (const MGDoFHexAccessor &a) { - DoFHexAccessor::copy_from (a); + DoFHexAccessor::copy_from (a); set_mg_dof_handler (a.mg_dof_handler); }; diff --git a/deal.II/deal.II/source/fe/fe_lib.cubic.cc b/deal.II/deal.II/source/fe/fe_lib.cubic.cc index 2bcd5c41d5..3efee16c5d 100644 --- a/deal.II/deal.II/source/fe/fe_lib.cubic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.cubic.cc @@ -181,16 +181,16 @@ void FEQ3<1>::get_unit_support_points (vector > &unit_points) const { template <> -void FEQ3<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell, - vector > &support_points) const { +void FEQ3<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell, + vector > &support_points) const { FiniteElement<1>::get_support_points (cell, support_points); }; template <> -void FEQ3<1>::get_face_support_points (const typename DoFHandler<1>::face_iterator &, - vector > &) const { +void FEQ3<1>::get_face_support_points (const DoFHandler<1>::face_iterator &, + vector > &) const { Assert (false, ExcInternalError()); }; @@ -198,7 +198,7 @@ void FEQ3<1>::get_face_support_points (const typename DoFHandler<1>::face_iterat template <> void FEQ3<1>::get_local_mass_matrix (const DoFHandler<1>::cell_iterator &cell, - FullMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -1505,8 +1505,8 @@ void FEQ3<2>::get_unit_support_points (vector > &unit_points) const { template <> -void FEQ3<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &cell, - vector > &support_points) const { +void FEQ3<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell, + vector > &support_points) const { Assert (support_points.size() == total_dofs, ExcWrongFieldDimension (support_points.size(), total_dofs)); @@ -1579,8 +1579,8 @@ void FEQ3<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &c template <> -void FEQ3<2>::get_face_support_points (const typename DoFHandler<2>::face_iterator &face, - vector > &support_points) const { +void FEQ3<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face, + vector > &support_points) const { Assert (support_points.size() == dofs_per_face, ExcWrongFieldDimension (support_points.size(), dofs_per_face)); diff --git a/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc b/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc index 42a1e984b4..10aef4f63a 100644 --- a/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc +++ b/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc @@ -45,8 +45,8 @@ FEDG_Q0<1>::FEDG_Q0 () : template <> void -FEDG_Q0<1>::get_face_support_points (const typename DoFHandler<1>::face_iterator &, - vector > &) const { +FEDG_Q0<1>::get_face_support_points (const DoFHandler<1>::face_iterator &, + vector > &) const { Assert (false, ExcInternalError()); }; @@ -93,7 +93,7 @@ double FEDG_Q0::shape_value (const unsigned int i, const Point&) const { - Assert((i FEDG_Q0::shape_grad (const unsigned int i, const Point&) const { - Assert((i (); }; @@ -117,7 +117,7 @@ Tensor<2,dim> FEDG_Q0::shape_grad_grad (const unsigned int i, const Point &) const { - Assert((i(); }; diff --git a/deal.II/deal.II/source/fe/fe_lib.linear.cc b/deal.II/deal.II/source/fe/fe_lib.linear.cc index 92e18c8ef2..dd68f443ba 100644 --- a/deal.II/deal.II/source/fe/fe_lib.linear.cc +++ b/deal.II/deal.II/source/fe/fe_lib.linear.cc @@ -126,16 +126,16 @@ void FEQ1<1>::get_unit_support_points (vector > &support_points) const template <> -void FEQ1<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell, - vector > &support_points) const { +void FEQ1<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell, + vector > &support_points) const { FiniteElement<1>::get_support_points (cell, support_points); }; template <> -void FEQ1<1>::get_face_support_points (const typename DoFHandler<1>::face_iterator &, - vector > &) const { +void FEQ1<1>::get_face_support_points (const DoFHandler<1>::face_iterator &, + vector > &) const { Assert (false, ExcInternalError()); }; diff --git a/deal.II/deal.II/source/fe/fe_lib.quadratic.cc b/deal.II/deal.II/source/fe/fe_lib.quadratic.cc index 58118041be..c16f5e83da 100644 --- a/deal.II/deal.II/source/fe/fe_lib.quadratic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.quadratic.cc @@ -192,16 +192,16 @@ void FEQ2<1>::get_unit_support_points (vector > &unit_points) const { template <> -void FEQ2<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell, - vector > &support_points) const { +void FEQ2<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell, + vector > &support_points) const { FiniteElement<1>::get_support_points (cell, support_points); }; template <> -void FEQ2<1>::get_face_support_points (const typename DoFHandler<1>::face_iterator &, - vector > &) const { +void FEQ2<1>::get_face_support_points (const DoFHandler<1>::face_iterator &, + vector > &) const { Assert (false, ExcInternalError()); }; @@ -1075,8 +1075,8 @@ void FEQ2<2>::get_unit_support_points (vector > &unit_points) const { template <> -void FEQ2<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &cell, - vector > &support_points) const { +void FEQ2<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell, + vector > &support_points) const { Assert (support_points.size() == total_dofs, ExcWrongFieldDimension (support_points.size(), total_dofs)); @@ -1103,8 +1103,8 @@ void FEQ2<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &c template <> -void FEQ2<2>::get_face_support_points (const typename DoFHandler<2>::face_iterator &face, - vector > &support_points) const { +void FEQ2<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face, + vector > &support_points) const { Assert (support_points.size() == dofs_per_face, ExcWrongFieldDimension (support_points.size(), dofs_per_face)); @@ -2818,8 +2818,8 @@ void FEQ2<3>::get_unit_support_points (vector > &unit_points) const { template <> -void FEQ2<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &cell, - vector > &support_points) const { +void FEQ2<3>::get_support_points (const DoFHandler<3>::cell_iterator &cell, + vector > &support_points) const { Assert (support_points.size() == total_dofs, ExcWrongFieldDimension (support_points.size(), total_dofs)); @@ -2918,8 +2918,8 @@ void FEQ2<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &c template <> -void FEQ2<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &face, - vector > &support_points) const { +void FEQ2<3>::get_face_support_points (const DoFHandler<3>::face_iterator &face, + vector > &support_points) const { Assert (support_points.size() == dofs_per_face, ExcWrongFieldDimension (support_points.size(), dofs_per_face)); diff --git a/deal.II/deal.II/source/fe/fe_lib.quartic.cc b/deal.II/deal.II/source/fe/fe_lib.quartic.cc index 26c4eac9fb..c30683eb3a 100644 --- a/deal.II/deal.II/source/fe/fe_lib.quartic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.quartic.cc @@ -148,16 +148,16 @@ void FEQ4<1>::get_unit_support_points (vector > &unit_points) const { template <> -void FEQ4<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell, - vector > &support_points) const { +void FEQ4<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell, + vector > &support_points) const { FiniteElement<1>::get_support_points (cell, support_points); }; template <> -void FEQ4<1>::get_face_support_points (const typename DoFHandler<1>::face_iterator &, - vector > &) const { +void FEQ4<1>::get_face_support_points (const DoFHandler<1>::face_iterator &, + vector > &) const { Assert (false, ExcInternalError()); }; @@ -2636,8 +2636,8 @@ void FEQ4<2>::get_unit_support_points (vector > &unit_points) const { template <> -void FEQ4<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &cell, - vector > &support_points) const { +void FEQ4<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell, + vector > &support_points) const { Assert (support_points.size() == total_dofs, ExcWrongFieldDimension (support_points.size(), total_dofs)); @@ -2745,8 +2745,8 @@ void FEQ4<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &c template <> -void FEQ4<2>::get_face_support_points (const typename DoFHandler<2>::face_iterator &face, - vector > &support_points) const { +void FEQ4<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face, + vector > &support_points) const { Assert (support_points.size() == dofs_per_face, ExcWrongFieldDimension (support_points.size(), dofs_per_face)); diff --git a/deal.II/deal.II/source/fe/fe_system.cc b/deal.II/deal.II/source/fe/fe_system.cc index e5fb7b1541..389714d643 100644 --- a/deal.II/deal.II/source/fe/fe_system.cc +++ b/deal.II/deal.II/source/fe/fe_system.cc @@ -519,7 +519,7 @@ double FESystem::shape_value (const unsigned int i, const Point &p) const { - Assert((i comp = system_to_component_index(i); @@ -534,7 +534,7 @@ Tensor<1,dim> FESystem::shape_grad (const unsigned int i, const Point &p) const { - Assert((i comp = system_to_component_index(i); @@ -549,7 +549,7 @@ Tensor<2,dim> FESystem::shape_grad_grad (const unsigned int i, const Point &p) const { - Assert((i comp = system_to_component_index(i); diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index 07c8581ce1..4fdf47e898 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -51,11 +51,11 @@ template double FEValuesBase::shape_value (const unsigned int i, const unsigned int j) const { Assert (selected_dataset::FEFaceValuesBase (const unsigned int n_q_points, template const Point & FEFaceValuesBase::normal_vector (const unsigned int i) const { - Assert (i + + +// enable these lines for gcc2.95 +// +//const unsigned int GeometryInfo::vertices_per_cell; +//const unsigned int GeometryInfo::lines_per_cell; +//const unsigned int GeometryInfo::quads_per_cell; +//const unsigned int GeometryInfo::hexes_per_cell; +//const unsigned int GeometryInfo::children_per_cell; + + + diff --git a/deal.II/deal.II/source/grid/tria_accessor.cc b/deal.II/deal.II/source/grid/tria_accessor.cc index 770f021f50..86ffd9510f 100644 --- a/deal.II/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/deal.II/source/grid/tria_accessor.cc @@ -28,7 +28,7 @@ void LineAccessor::set (const Line &line) const { template int LineAccessor::vertex_index (const unsigned int i) const { - Assert (i<2, ExcInvalidIndex(i,0,1)); + Assert (i<2, ExcIndexRange(i,0,2)); return tria->levels[present_level]->lines.lines[present_index].vertex (i); }; @@ -205,7 +205,7 @@ void QuadAccessor::set (const Quad &quad) const { template int QuadAccessor::vertex_index (const unsigned int corner) const { - Assert (corner<4, ExcInvalidIndex(corner,0,3)); + Assert (corner<4, ExcIndexRange(corner,0,4)); const int corner_convention[4] = { 0,0,1,1 }; return line(corner)->vertex_index(corner_convention[corner]); @@ -578,7 +578,7 @@ void HexAccessor::set (const Hexahedron &hex) const { template int HexAccessor::vertex_index (const unsigned int corner) const { - Assert (corner<8, ExcInvalidIndex(corner,0,7)); + Assert (corner<8, ExcIndexRange(corner,0,8)); // get the corner indices by asking // either the front or the back face @@ -1489,8 +1489,7 @@ bool CellAccessor<1>::at_boundary () const { template <> unsigned char CellAccessor<1>::material_id () const { - Assert (used(), - typename TriaSubstructAccessor<1>::ExcCellNotUsed()); + Assert (used(), TriaSubstructAccessor<1>::ExcCellNotUsed()); return tria->levels[present_level]->lines.material_id[present_index]; }; @@ -1498,8 +1497,7 @@ unsigned char CellAccessor<1>::material_id () const { template <> void CellAccessor<1>::set_material_id (const unsigned char mat_id) const { - Assert (used(), - typename TriaSubstructAccessor<1>::ExcCellNotUsed()); + Assert (used(), TriaSubstructAccessor<1>::ExcCellNotUsed()); tria->levels[present_level]->lines.material_id[present_index] = mat_id; }; @@ -1522,8 +1520,7 @@ bool CellAccessor<2>::at_boundary () const { template <> unsigned char CellAccessor<2>::material_id () const { - Assert (used(), - typename TriaSubstructAccessor<2>::ExcCellNotUsed()); + Assert (used(), TriaSubstructAccessor<2>::ExcCellNotUsed()); return tria->levels[present_level]->quads.material_id[present_index]; }; @@ -1531,8 +1528,7 @@ unsigned char CellAccessor<2>::material_id () const { template <> void CellAccessor<2>::set_material_id (const unsigned char mat_id) const { - Assert (used(), - typename TriaSubstructAccessor<2>::ExcCellNotUsed()); + Assert (used(), TriaSubstructAccessor<2>::ExcCellNotUsed()); tria->levels[present_level]->quads.material_id[present_index] = mat_id; }; @@ -1557,8 +1553,7 @@ bool CellAccessor<3>::at_boundary () const { template <> unsigned char CellAccessor<3>::material_id () const { - Assert (used(), - typename TriaSubstructAccessor<3>::ExcCellNotUsed()); + Assert (used(), TriaSubstructAccessor<3>::ExcCellNotUsed()); return tria->levels[present_level]->hexes.material_id[present_index]; }; @@ -1566,8 +1561,7 @@ unsigned char CellAccessor<3>::material_id () const { template <> void CellAccessor<3>::set_material_id (const unsigned char mat_id) const { - Assert (used(), - typename TriaSubstructAccessor<3>::ExcCellNotUsed()); + Assert (used(), TriaSubstructAccessor<3>::ExcCellNotUsed()); tria->levels[present_level]->hexes.material_id[present_index] = mat_id; }; @@ -1610,8 +1604,7 @@ template bool CellAccessor::at_boundary (const unsigned int i) const { Assert (used(), typename TriaSubstructAccessor::ExcCellNotUsed()); Assert (i::faces_per_cell, - typename TriaSubstructAccessor:: - ExcInvalidIndex (i,0,GeometryInfo::faces_per_cell-1)); + ExcIndexRange (i,0,GeometryInfo::faces_per_cell)); return (neighbor_index(i) == -1); }; diff --git a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc index d6fd3b0b24..2807fd47e1 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc @@ -27,7 +27,7 @@ MGDoFLineAccessor::MGDoFLineAccessor (Triangulation *tria, const int index, const AccessorData *local_data) : MGDoFAccessor (local_data), - DoFLineAccessor(tria,level,index,local_data) {}; + DoFLineAccessor(tria,level,index,local_data) {}; @@ -39,7 +39,7 @@ int MGDoFLineAccessor::mg_dof_index (const unsigned int i) const // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_line, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_line)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line)); return mg_dof_handler->mg_levels[present_level] ->line_dofs[present_index*dof_handler->get_fe().dofs_per_line+i]; @@ -58,7 +58,7 @@ void MGDoFLineAccessor::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_line, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_line)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line)); mg_dof_handler->mg_levels[present_level] ->line_dofs[present_index*dof_handler->get_fe().dofs_per_line+i] = index; @@ -73,9 +73,9 @@ int MGDoFLineAccessor::mg_vertex_dof_index (const unsigned int ve Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<2, ExcInvalidIndex (i,0,2)); + Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .get_index (present_level, i, dof_handler->get_fe().dofs_per_vertex)); @@ -90,9 +90,9 @@ void MGDoFLineAccessor::set_mg_vertex_dof_index (const unsigned i Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<2, ExcInvalidIndex (i,0,2)); + Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); @@ -142,7 +142,7 @@ MGDoFLineAccessor::child (const unsigned int i) const { template void MGDoFLineAccessor::copy_from (const MGDoFLineAccessor &a) { - DoFLineAccessor::copy_from (a); + DoFLineAccessor::copy_from (a); set_mg_dof_handler (a.mg_dof_handler); }; @@ -157,7 +157,7 @@ MGDoFQuadAccessor::MGDoFQuadAccessor (Triangulation *tria, const int index, const AccessorData *local_data) : MGDoFAccessor (local_data), - DoFQuadAccessor(tria,level,index,local_data) {}; + DoFQuadAccessor(tria,level,index,local_data) {}; @@ -170,7 +170,7 @@ int MGDoFQuadAccessor::mg_dof_index (const unsigned int i) const // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_quad, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_quad)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad)); return mg_dof_handler->mg_levels[present_level] ->quad_dofs[present_index*dof_handler->get_fe().dofs_per_quad+i]; @@ -187,7 +187,7 @@ void MGDoFQuadAccessor::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_quad, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_quad)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad)); mg_dof_handler->mg_levels[present_level] ->quad_dofs[present_index*dof_handler->get_fe().dofs_per_quad+i] = index; @@ -202,9 +202,9 @@ int MGDoFQuadAccessor::mg_vertex_dof_index (const unsigned int ve Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .get_index (present_level, i, dof_handler->get_fe().dofs_per_vertex)); @@ -219,9 +219,9 @@ void MGDoFQuadAccessor::set_mg_vertex_dof_index (const unsigned i Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); @@ -259,7 +259,7 @@ MGDoFQuadAccessor::get_mg_dof_indices (vector &dof_indices) template TriaIterator > > MGDoFQuadAccessor::line (const unsigned int i) const { - Assert (i<4, ExcInvalidIndex (i, 0, 4)); + Assert (i<4, ExcIndexRange (i, 0, 4)); return TriaIterator > > ( @@ -292,7 +292,7 @@ MGDoFQuadAccessor::child (const unsigned int i) const { template void MGDoFQuadAccessor::copy_from (const MGDoFQuadAccessor &a) { - DoFQuadAccessor::copy_from (a); + DoFQuadAccessor::copy_from (a); set_mg_dof_handler (a.mg_dof_handler); }; @@ -307,7 +307,7 @@ MGDoFHexAccessor::MGDoFHexAccessor (Triangulation *tria, const int index, const AccessorData *local_data) : MGDoFAccessor (local_data), - DoFHexAccessor(tria,level,index,local_data) {}; + DoFHexAccessor(tria,level,index,local_data) {}; @@ -320,7 +320,7 @@ int MGDoFHexAccessor::mg_dof_index (const unsigned int i) const { // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_hex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_hex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex)); return mg_dof_handler->mg_levels[present_level] ->hex_dofs[present_index*dof_handler->get_fe().dofs_per_hex+i]; @@ -337,7 +337,7 @@ void MGDoFHexAccessor::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (iget_fe().dofs_per_hex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_hex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex)); mg_dof_handler->mg_levels[present_level] ->hex_dofs[present_index*dof_handler->get_fe().dofs_per_hex+i] = index; @@ -352,9 +352,9 @@ int MGDoFHexAccessor::mg_vertex_dof_index (const unsigned int ver Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<8, ExcInvalidIndex (i,0,8)); + Assert (vertex<8, ExcIndexRange (i,0,8)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .get_index (present_level, i, dof_handler->get_fe().dofs_per_vertex)); @@ -369,9 +369,9 @@ void MGDoFHexAccessor::set_mg_vertex_dof_index (const unsigned in Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); - Assert (vertex<4, ExcInvalidIndex (i,0,4)); + Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (iget_fe().dofs_per_vertex, - ExcInvalidIndex (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); @@ -414,7 +414,7 @@ MGDoFHexAccessor::get_mg_dof_indices (vector &dof_indices) c template TriaIterator > > MGDoFHexAccessor::line (const unsigned int i) const { - Assert (i<12, ExcInvalidIndex (i, 0, 12)); + Assert (i<12, ExcIndexRange (i, 0, 12)); return TriaIterator > > ( @@ -430,7 +430,7 @@ MGDoFHexAccessor::line (const unsigned int i) const { template TriaIterator > > MGDoFHexAccessor::quad (const unsigned int i) const { - Assert (i<12, ExcInvalidIndex (i, 0, 6)); + Assert (i<12, ExcIndexRange (i, 0, 6)); return TriaIterator > > ( @@ -463,7 +463,7 @@ MGDoFHexAccessor::child (const unsigned int i) const { template void MGDoFHexAccessor::copy_from (const MGDoFHexAccessor &a) { - DoFHexAccessor::copy_from (a); + DoFHexAccessor::copy_from (a); set_mg_dof_handler (a.mg_dof_handler); }; diff --git a/deal.II/deal.II/source/numerics/data_io.cc b/deal.II/deal.II/source/numerics/data_io.cc index 71079f2595..87a36858a8 100644 --- a/deal.II/deal.II/source/numerics/data_io.cc +++ b/deal.II/deal.II/source/numerics/data_io.cc @@ -1212,7 +1212,7 @@ void DataOut<2>::write_eps (ostream &out, const EpsOutputData &eod) const { float cell_vector_min=cells.begin()->red; float cell_vector_max=cell_vector_min; - for(typename multiset::EpsCellData>::iterator c=cells.begin(); + for(multiset::EpsCellData>::iterator c=cells.begin(); c!=cells.end(); ++c, ++cell_index) { for (unsigned int i=0; i<4; ++i) @@ -1245,7 +1245,7 @@ void DataOut<2>::write_eps (ostream &out, const EpsOutputData &eod) const { double light_norm, normal_norm; float color; - for (typename multiset::EpsCellData>::iterator c=cells.begin();c!=cells.end();++c) + for (multiset::EpsCellData>::iterator c=cells.begin();c!=cells.end();++c) { EpsCellData cd(*c); @@ -1301,7 +1301,7 @@ void DataOut<2>::write_eps (ostream &out, const EpsOutputData &eod) const { const double scale = 300 / (xmax-xmin > ymax-ymin ? xmax-xmin : ymax-ymin); - for (typename multiset::EpsCellData>::iterator c=cells2.begin(); + for (multiset::EpsCellData>::iterator c=cells2.begin(); c!=cells2.end(); ++c) { EpsCellData cd (*c); @@ -1319,7 +1319,7 @@ void DataOut<2>::write_eps (ostream &out, const EpsOutputData &eod) const { // Now we are ready to output... - for (typename multiset::EpsCellData>::iterator c=cells.begin(); + for (multiset::EpsCellData>::iterator c=cells.begin(); c!=cells.end(); ++c) { if (cell_data_p || cell_shade_p) diff --git a/deal.II/deal.II/source/numerics/histogram.cc b/deal.II/deal.II/source/numerics/histogram.cc index 5b7251b035..09a46ebdc0 100644 --- a/deal.II/deal.II/source/numerics/histogram.cc +++ b/deal.II/deal.II/source/numerics/histogram.cc @@ -72,9 +72,15 @@ void Histogram::evaluate (const vector > &values, case logarithmic: min_value = *min_element(values[0].begin(), values[0].end(), + // for gcc2.95 +// &Histogram::template logarithmic_less); + // for egcs1.1.2 &logarithmic_less); max_value = *max_element(values[0].begin(), values[0].end(), + // for gcc2.95 +// &Histogram::template logarithmic_less); + // for egcs1.1.2 &logarithmic_less); for (unsigned int i=1; i > &values, min_value = min (min_value, *min_element(values[i].begin(), values[i].end(), + // for gcc2.95 +// &Histogram::template logarithmic_less); + // for egcs1.1.2 &logarithmic_less), + // for gcc2.95 +// &Histogram::template logarithmic_less); + // for egcs1.1.2 &logarithmic_less); max_value = max (max_value, *max_element(values[i].begin(), values[i].end(), - &logarithmic_less)); + // for gcc2.95 +// &Histogram::template logarithmic_less); + // for egcs1.1.2 + &logarithmic_less), + // for gcc2.95 +// &Histogram::template logarithmic_less); + // for egcs1.1.2 + &logarithmic_less); }; break; diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index 9ae672f09e..d3834cd23e 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -569,10 +569,11 @@ void MassMatrix::assemble (FullMatrix &cell_matrix, n_q_points = fe_values.n_quadrature_points; Assert (cell_matrix.n() == total_dofs, - ExcWrongSize(cell_matrix.n(), total_dofs)); + Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); Assert (cell_matrix.m() == total_dofs, - ExcWrongSize(cell_matrix.m(), total_dofs)); - Assert (cell_matrix.all_zero(), ExcObjectNotEmpty()); + Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); + Assert (cell_matrix.all_zero(), + Equation::ExcObjectNotEmpty()); const FullMatrix &values = fe_values.get_shape_values (); const vector &weights = fe_values.get_JxW_values (); @@ -613,13 +614,15 @@ void MassMatrix::assemble (FullMatrix &cell_matrix, n_q_points = fe_values.n_quadrature_points; Assert (cell_matrix.n() == total_dofs, - ExcWrongSize(cell_matrix.n(), total_dofs)); + Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); Assert (cell_matrix.m() == total_dofs, - ExcWrongSize(cell_matrix.m(), total_dofs)); + Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); Assert (rhs.size() == total_dofs, - ExcWrongSize(rhs.size(), total_dofs)); - Assert (cell_matrix.all_zero(), ExcObjectNotEmpty()); - Assert (rhs.all_zero(), ExcObjectNotEmpty()); + Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (cell_matrix.all_zero(), + Equation::ExcObjectNotEmpty()); + Assert (rhs.all_zero(), + Equation::ExcObjectNotEmpty()); const FullMatrix &values = fe_values.get_shape_values (); const vector &weights = fe_values.get_JxW_values (); @@ -669,8 +672,10 @@ void MassMatrix::assemble (Vector &rhs, const unsigned int total_dofs = fe_values.total_dofs, n_q_points = fe_values.n_quadrature_points; - Assert (rhs.size() == total_dofs, ExcWrongSize(rhs.size(), total_dofs)); - Assert (rhs.all_zero(), ExcObjectNotEmpty()); + Assert (rhs.size() == total_dofs, + Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (rhs.all_zero(), + Equation::ExcObjectNotEmpty()); const FullMatrix &values = fe_values.get_shape_values (); const vector &weights = fe_values.get_JxW_values (); @@ -707,13 +712,15 @@ void LaplaceMatrix::assemble (FullMatrix &cell_matrix, n_q_points = fe_values.n_quadrature_points; Assert (cell_matrix.n() == total_dofs, - ExcWrongSize(cell_matrix.n(), total_dofs)); + Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); Assert (cell_matrix.m() == total_dofs, - ExcWrongSize(cell_matrix.m(), total_dofs)); + Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); Assert (rhs.size() == total_dofs, - ExcWrongSize(rhs.size(), total_dofs)); - Assert (cell_matrix.all_zero(), ExcObjectNotEmpty()); - Assert (rhs.all_zero(), ExcObjectNotEmpty()); + Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (cell_matrix.all_zero(), + Equation::ExcObjectNotEmpty()); + Assert (rhs.all_zero(), + Equation::ExcObjectNotEmpty()); const vector > >&gradients = fe_values.get_shape_grads (); const FullMatrix &values = fe_values.get_shape_values (); @@ -764,10 +771,11 @@ void LaplaceMatrix::assemble (FullMatrix &cell_matrix, n_q_points = fe_values.n_quadrature_points; Assert (cell_matrix.n() == total_dofs, - ExcWrongSize(cell_matrix.n(), total_dofs)); + Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); Assert (cell_matrix.m() == total_dofs, - ExcWrongSize(cell_matrix.m(), total_dofs)); - Assert (cell_matrix.all_zero(), ExcObjectNotEmpty()); + Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); + Assert (cell_matrix.all_zero(), + Equation::ExcObjectNotEmpty()); const vector > >&gradients = fe_values.get_shape_grads (); const vector &weights = fe_values.get_JxW_values (); @@ -805,8 +813,10 @@ void LaplaceMatrix::assemble (Vector &rhs, const unsigned int total_dofs = fe_values.total_dofs, n_q_points = fe_values.n_quadrature_points; - Assert (rhs.size() == total_dofs, ExcWrongSize(rhs.size(), total_dofs)); - Assert (rhs.all_zero(), ExcObjectNotEmpty()); + Assert (rhs.size() == total_dofs, + Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (rhs.all_zero(), + Equation::ExcObjectNotEmpty()); const FullMatrix &values = fe_values.get_shape_values (); const vector &weights = fe_values.get_JxW_values (); diff --git a/deal.II/lac/include/lac/solver.h b/deal.II/lac/include/lac/solver.h index 2b59d6ba47..a3dab8bc61 100644 --- a/deal.II/lac/include/lac/solver.h +++ b/deal.II/lac/include/lac/solver.h @@ -192,19 +192,19 @@ class SolverDual : public Solver * Solve the original problem * $Ax=b$. */ - ReturnState solve (const Matrix &A, - Vector &x, - const Vector &b) = 0; + typename Solver::ReturnState solve (const Matrix &A, + Vector &x, + const Vector &b) = 0; /** * Solve the two problems * $Ax=b1$ and $A^Tz=b2$ simultanously. */ - ReturnState solve (const Matrix &A, - Vector &x, - const Vector &b1, - Vector &z, - const Vector &b2) = 0; + typename Solver::ReturnState solve (const Matrix &A, + Vector &x, + const Vector &b1, + Vector &z, + const Vector &b2) = 0; }; diff --git a/deal.II/lac/include/lac/solver_bicgstab.h b/deal.II/lac/include/lac/solver_bicgstab.h index 17e2154f23..d8e11ce3ca 100644 --- a/deal.II/lac/include/lac/solver_bicgstab.h +++ b/deal.II/lac/include/lac/solver_bicgstab.h @@ -49,10 +49,10 @@ class SolverBicgstab : public Solver * Solve primal problem only. */ template - ReturnState solve (const Matrix &A, - Vector &x, - const Vector &b, - const Preconditioner& precondition); + typename Solver::ReturnState solve (const Matrix &A, + Vector &x, + const Vector &b, + const Preconditioner& precondition); protected: /** @@ -181,9 +181,11 @@ SolverBicgstab::start() return state; } + + template template -Solver::ReturnState +typename Solver::ReturnState SolverBicgstab::iterate(const Preconditioner& precondition) { SolverControl::State state = SolverControl::iterate; diff --git a/deal.II/lac/include/lac/solver_cg.h b/deal.II/lac/include/lac/solver_cg.h index 811e271a8c..d58d0be0b3 100644 --- a/deal.II/lac/include/lac/solver_cg.h +++ b/deal.II/lac/include/lac/solver_cg.h @@ -56,7 +56,8 @@ class SolverCG : public Solver * Solver method. */ template - ReturnState solve (const Matrix &A, + typename Solver::ReturnState + solve (const Matrix &A, Vector &x, const Vector &b, const Preconditioner& precondition); @@ -113,11 +114,11 @@ SolverCG::criterion() template template -Solver::ReturnState +typename Solver::ReturnState SolverCG::solve (const Matrix &A, - Vector &x, - const Vector &b, - const Preconditioner& precondition) + Vector &x, + const Vector &b, + const Preconditioner& precondition) { SolverControl::State conv=SolverControl::iterate; diff --git a/deal.II/lac/include/lac/solver_gmres.h b/deal.II/lac/include/lac/solver_gmres.h index c5cd615dba..fe4947f98e 100644 --- a/deal.II/lac/include/lac/solver_gmres.h +++ b/deal.II/lac/include/lac/solver_gmres.h @@ -98,10 +98,10 @@ class SolverGMRES : public Solver * Solver method. */ template - ReturnState solve (const Matrix &A, - Vector &x, - const Vector &b, - const Preconditioner& precondition); + typename Solver::ReturnState solve (const Matrix &A, + Vector &x, + const Vector &b, + const Preconditioner& precondition); DeclException1 (ExcTooFewTmpVectors, int, @@ -183,7 +183,7 @@ SolverGMRES::givens_rotation (Vector &h, template template -Solver::ReturnState +typename Solver::ReturnState SolverGMRES::solve (const Matrix& A, Vector & x, const Vector& b, diff --git a/deal.II/lac/include/lac/solver_richardson.h b/deal.II/lac/include/lac/solver_richardson.h index 36b1b13c5b..f2c2b18245 100644 --- a/deal.II/lac/include/lac/solver_richardson.h +++ b/deal.II/lac/include/lac/solver_richardson.h @@ -68,10 +68,10 @@ class SolverRichardson : public Solver * Solve $Ax=b$ for $x$. */ template - ReturnState solve (const Matrix &A, - Vector &x, - const Vector &b, - const Preconditioner& precondition); + typename Solver::ReturnState solve (const Matrix &A, + Vector &x, + const Vector &b, + const Preconditioner& precondition); /** * Set the damping-coefficient. @@ -128,7 +128,7 @@ SolverRichardson::SolverRichardson(SolverControl &cn, template template -Solver::ReturnState +typename Solver::ReturnState SolverRichardson::solve (const Matrix &A, Vector &x, const Vector &b, diff --git a/deal.II/lac/include/lac/solver_selector.h b/deal.II/lac/include/lac/solver_selector.h index 994d2eb8c0..cd1c1ff63a 100644 --- a/deal.II/lac/include/lac/solver_selector.h +++ b/deal.II/lac/include/lac/solver_selector.h @@ -104,10 +104,10 @@ class SolverSelector * */ template - Solver::ReturnState solve(const Matrix &A, - Vector &x, - const Vector &b, - const Preconditioner &precond) const; + typename Solver::ReturnState solve(const Matrix &A, + Vector &x, + const Vector &b, + const Preconditioner &precond) const; /** * Set the additional data. For more @@ -215,7 +215,7 @@ SolverSelector::~SolverSelector() template template -Solver::ReturnState +typename Solver::ReturnState SolverSelector::solve(const Matrix &A, Vector &x, const Vector &b, diff --git a/deal.II/lac/include/lac/sparse_matrix.h b/deal.II/lac/include/lac/sparse_matrix.h index f2fbec3589..94c277dc91 100644 --- a/deal.II/lac/include/lac/sparse_matrix.h +++ b/deal.II/lac/include/lac/sparse_matrix.h @@ -1061,8 +1061,7 @@ class SparseMatrix : public Subscriptor // make all other sparse matrices // friends - template friend class SparseMatrix; - + template friend class SparseMatrix; };