]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check in a large patch to remove all error messages that the present snapshot of...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Jun 1999 15:31:05 +0000 (15:31 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Jun 1999 15:31:05 +0000 (15:31 +0000)
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<dim>;' 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 <dim> 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

47 files changed:
deal.II/base/Todo
deal.II/base/include/base/quadrature.h
deal.II/base/include/base/tensor.h
deal.II/base/include/base/tensor_base.h
deal.II/deal.II/Make.global_options
deal.II/deal.II/Make_forward_declarations
deal.II/deal.II/Todo
deal.II/deal.II/include/dofs/dof_accessor.h
deal.II/deal.II/include/dofs/dof_accessor.templates.h
deal.II/deal.II/include/dofs/dof_handler.h
deal.II/deal.II/include/dofs/mg_dof_accessor.h
deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/include/fe/fe_lib.dg.h
deal.II/deal.II/include/fe/fe_system.h
deal.II/deal.II/include/fe/fe_values.h
deal.II/deal.II/include/grid/tria_accessor.h
deal.II/deal.II/include/grid/tria_accessor.templates.h
deal.II/deal.II/include/grid/tria_iterator.h
deal.II/deal.II/include/multigrid/mg_dof_accessor.h
deal.II/deal.II/include/numerics/data_io.h
deal.II/deal.II/include/numerics/error_estimator.h
deal.II/deal.II/include/numerics/matrices.h
deal.II/deal.II/include/numerics/solution_transfer.h
deal.II/deal.II/include/numerics/time_dependent.h
deal.II/deal.II/include/numerics/vectors.h
deal.II/deal.II/source/dofs/dof_accessor.cc
deal.II/deal.II/source/dofs/mg_dof_accessor.cc
deal.II/deal.II/source/fe/fe_lib.cubic.cc
deal.II/deal.II/source/fe/fe_lib.dg.constant.cc
deal.II/deal.II/source/fe/fe_lib.linear.cc
deal.II/deal.II/source/fe/fe_lib.quadratic.cc
deal.II/deal.II/source/fe/fe_lib.quartic.cc
deal.II/deal.II/source/fe/fe_system.cc
deal.II/deal.II/source/fe/fe_values.cc
deal.II/deal.II/source/grid/geometry_info.cc [new file with mode: 0644]
deal.II/deal.II/source/grid/tria_accessor.cc
deal.II/deal.II/source/multigrid/mg_dof_accessor.cc
deal.II/deal.II/source/numerics/data_io.cc
deal.II/deal.II/source/numerics/histogram.cc
deal.II/deal.II/source/numerics/matrices.cc
deal.II/lac/include/lac/solver.h
deal.II/lac/include/lac/solver_bicgstab.h
deal.II/lac/include/lac/solver_cg.h
deal.II/lac/include/lac/solver_gmres.h
deal.II/lac/include/lac/solver_richardson.h
deal.II/lac/include/lac/solver_selector.h
deal.II/lac/include/lac/sparse_matrix.h

index c20b24ad379cc2842a8598266ceac5e27e9795f5..19e8a5eb977d22ac8939de933900b3a92f343ae9 100644 (file)
@@ -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.
index 6a17905eff6a8f9bc6f13d398086a0418f0637ba..79bed6d69384054944b4b3665b7b4bc9a59ec040 100644 (file)
@@ -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
  */
index 04e12a164d9e567850524b8f4e22f05bf6f4d777..c1249c3def14c6aead5485d8e1adfb925612f70c 100644 (file)
@@ -170,10 +170,20 @@ class Tensor //<rank_, dim>
                                     /**
                                      * Help function for unroll.
                                      */
-    void unroll_recursion(Vector<double> & result, unsigned int& start_index) const;
-
-    template<>
-    friend void Tensor<rank_+1,dim>::unroll_recursion(Vector<double> &, unsigned&) const;
+    void unroll_recursion(Vector<double> &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<int otherrank, int otherdim> friend class Tensor;
 };
 
 
index 61ca6bd0c460a19585dae44bcc85f486adc595d2..4280d93ed0afcac4ee4db1ac3c3f76759586d53d 100644 (file)
@@ -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<double> &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<double> & result,
-                          unsigned int& start_index) const;
-
-    template<>
-    friend void Tensor<2,dim>::unroll_recursion(Vector<double> &,
-                                               unsigned&) const;
+    void unroll_recursion (Vector<double> &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<int otherrank, int otherdim>  friend class Tensor;
 };
 
                                 /**
index de6c85759749813cacc1444233711360f6af4924..c919e7a50176aa517cc5a6b1e9d31cdac502daa8 100644 (file)
@@ -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)
index 79add620e423d51fe6605c097d693cfafcbbea34..04167c363f1c05c1688d52295718edd49f858bc5 100644 (file)
@@ -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;
index f2cdbf86e397e57b1c68238801648c267da8fb62..1ffebc17c267ddd9d786f553e3ea3445d07a7e3a 100644 (file)
@@ -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<int> in 'void DoFQuadAccessor::get_dof_indices(
        vector<int> &dof_indices) const' in a vector<unsigned int> 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.
index 5c9e04ac887d1a93bf1c90af81697001c1ac78d3..6b18d4b5a06cac8ccf7a6256729e8afd8c736433 100644 (file)
@@ -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
index 4ef917f1029497ff4cc0d498126d0e10ae20e70d..4f7dd75ccedc898bf99d29cedd02118217e2ed5d 100644 (file)
@@ -29,7 +29,7 @@ int DoFLineAccessor<dim,BaseClass>::dof_index (const unsigned int i) const {
                                   // and enough room was reserved
   Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
   Assert (i<dof_handler->selected_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<dim,BaseClass>::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 (i<dof_handler->selected_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<dim,BaseClass>::dof_index (const unsigned int i) const {
                                   // and enough room was reserved
   Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
   Assert (i<dof_handler->selected_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<dim,BaseClass>::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 (i<dof_handler->selected_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 <int dim, typename BaseClass>
 inline
 TriaIterator<dim,DoFLineAccessor<dim,LineAccessor<dim> > >
 DoFQuadAccessor<dim,BaseClass>::line (const unsigned int i) const {
-  Assert (i<4, ExcInvalidIndex (i, 0, 4));
+  Assert (i<4, ExcIndexRange (i, 0, 4));
 
   return TriaIterator<dim,DoFLineAccessor<dim,LineAccessor<dim> > >
     (
@@ -227,7 +227,7 @@ int DoFHexAccessor<dim,BaseClass>::dof_index (const unsigned int i) const {
                                   // and enough room was reserved
   Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
   Assert (i<dof_handler->selected_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<dim,BaseClass>::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 (i<dof_handler->selected_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 <int dim, typename BaseClass>
 inline
 TriaIterator<dim,DoFQuadAccessor<dim,QuadAccessor<dim> > >
 DoFHexAccessor<dim,BaseClass>::quad (const unsigned int i) const {
-  Assert (i<6, ExcInvalidIndex (i, 0, 6));
+  Assert (i<6, ExcIndexRange (i, 0, 6));
 
   return TriaIterator<dim,DoFQuadAccessor<dim,QuadAccessor<dim> > >
     (
index 3406fd190c692b6f67e6392c1bb7f97d904bbeca..8b9be0d746ce5c5298b2860956e85c3b9e1ae844 100644 (file)
@@ -347,10 +347,8 @@ class DoFDimensionInfo<3> {
  *
  * @author Wolfgang Bangerth, 1998 */
 template <int dim>
-class DoFHandler
-  :
-  public Subscriptor,
-  public DoFDimensionInfo<dim>
+class DoFHandler  :  public Subscriptor,
+                    public DoFDimensionInfo<dim>
 {
   public:
     typedef typename DoFDimensionInfo<dim>::raw_line_iterator raw_line_iterator;
@@ -1373,10 +1371,6 @@ class DoFHandler
                                      */
     const Triangulation<dim> & get_tria () const;
     
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotImplemented);
                                     /**
                                      * Exception
                                      */
index b3ccf0d7127b948e0d38c15df01f6e4e8482f122..774ef28cea6e414d3e4e374f07a7e3f59d96737e 100644 (file)
@@ -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
index b4f87a409aedc07be4eccb077e5d0d904f7d916b..bccd93472161e88b5e27e5e96b92ae54fa73a81d 100644 (file)
@@ -1407,10 +1407,6 @@ class FiniteElement : public FiniteElementBase<dim>
                                     /**
                                      * Exception
                                      */
-    DeclException0 (ExcNotImplemented);
-                                    /**
-                                     * Exception
-                                     */
     DeclException0 (ExcBoundaryFaceUsed);
                                     /**
                                      * Exception
index 7705e145bbb6b7c4ae74cc800c57f60da89e9d1e..d4137558a3007510e55f3c02e48a978acbe2785c 100644 (file)
@@ -93,11 +93,6 @@ class FEDG_Q0 : public FEQ1Mapping<dim> {
                                      * about.
                                      */
     const FullMatrix<double> & restrict (const unsigned int) const;
-  
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotImplemented);
 };
 
 
index 7722c06dae986a3f27fcddb0abb29f0d654dfec6..180f711881175ccf40bd95127b5fac6519d79e97 100644 (file)
@@ -526,7 +526,7 @@ FESystem<dim>::base_element(unsigned int index) const
 template <int dim>
 template <class FE>
 FESystem<dim>::FESystem (const FE &fe, const unsigned int n_elements) :
-               FiniteElement (multiply_dof_numbers(fe, n_elements)),
+               FiniteElement<dim> (multiply_dof_numbers(fe, n_elements)),
                base_elements(1),
                component_to_base_table(n_components)
 {
@@ -542,7 +542,7 @@ template <class FE1, class FE2>
 FESystem<dim>::FESystem (const FE1 &fe1, const unsigned int n1,
                         const FE2 &fe2, const unsigned int n2)
                :
-               FiniteElement (multiply_dof_numbers(fe1, n1, fe2, n2)),
+               FiniteElement<dim> (multiply_dof_numbers(fe1, n1, fe2, n2)),
                base_elements(2),
                component_to_base_table(n_components)
 {
@@ -564,9 +564,9 @@ FESystem<dim>::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<dim> (multiply_dof_numbers(fe1, n1,
+                                                        fe2, n2,
+                                                        fe3, n3)),
                base_elements(3),
                component_to_base_table(n_components)
 {
index e3d3fc3377dd5248b0dde1991842268bfe695c9c..6f366d30c272c0c71c0074e8e8c1057c2cec260c 100644 (file)
@@ -528,10 +528,6 @@ class FEValuesBase
                                     /**
                                      * Exception
                                      */
-    DeclException0 (ExcNotImplemented);
-                                    /**
-                                     * Exception
-                                     */
     DeclException0 (ExcInvalidUpdateFlag);
     
   protected:
index a4b780be7a5e12ede1c94d62c8bf2bf099a2a67b..716762ba8619a216514ffa247f4f11d885a34bea 100644 (file)
@@ -237,9 +237,9 @@ class TriaAccessor {
                                      */
     Triangulation<dim> *tria;
 
-    template <int dim, typename Accessor> friend class TriaRawIterator<dim,Accessor>;
-    template <int dim, typename Accessor> friend class TriaIterator<dim,Accessor>;
-    template <int dim, typename Accessor> friend class TriaActiveIterator<dim,Accessor>;
+    template <int anydim, typename Accessor> friend class TriaRawIterator;
+    template <int anydim, typename Accessor> friend class TriaIterator;
+    template <int anydim, typename Accessor> friend class TriaActiveIterator;
 };
 
 
@@ -560,8 +560,7 @@ class LineAccessor :  public TriaAccessor<dim> {
                                     /**
                                      * Declare some friends.
                                      */
-    template <int dim> friend class TriaRawIterator<dim,LineAccessor<dim> >;
-    template <>        friend class TriaRawIterator<1,CellAccessor<1> >;
+    template <int anydim, typename AnyAccessor> friend class TriaRawIterator;
 };
 
 
@@ -917,8 +916,7 @@ class QuadAccessor :  public TriaAccessor<dim> {
                                     /**
                                      * Declare some friends.
                                      */
-    template <int dim> friend class TriaRawIterator<dim,QuadAccessor<dim> >;
-    template <>        friend class TriaRawIterator<2,CellAccessor<2> >;
+    template <int anydim, typename AnyAccessor> friend class TriaRawIterator;
 };
 
 
@@ -1276,8 +1274,7 @@ class HexAccessor :  public TriaAccessor<dim> {
                                     /**
                                      * Declare some friends.
                                      */
-    template <int dim> friend class TriaRawIterator<dim,HexAccessor<dim> >;
-    template <>        friend class TriaRawIterator<3,CellAccessor<3> >;
+    template <int anydim, typename AnyAccessor> 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
index 3bb7d42824f43f2947b70df52fca8e2ed78dcab6..d878540c4d4130ee9e9c635115a24a256ab728f2 100644 (file)
@@ -145,7 +145,7 @@ template <int dim>
 inline
 TriaIterator<dim,LineAccessor<dim> >
 LineAccessor<dim>::child (const unsigned int i) const {
-  Assert (i<2, ExcInvalidIndex(i,0,1));
+  Assert (i<2, ExcIndexRange(i,0,2));
   
   TriaIterator<dim,LineAccessor<dim> > q (tria, present_level+1, child_index (i));
   
@@ -162,7 +162,7 @@ template <int dim>
 inline
 int
 LineAccessor<dim>::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 <int dim>
 inline
 unsigned int
 QuadAccessor<dim>::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 <int dim>
 inline
 TriaIterator<dim,QuadAccessor<dim> >
 QuadAccessor<dim>::child (const unsigned int i) const {
-  Assert (i<4, ExcInvalidIndex(i,0,3));
+  Assert (i<4, ExcIndexRange(i,0,4));
   
   TriaIterator<dim,QuadAccessor<dim> > q (tria, present_level+1, child_index (i));
   
@@ -340,7 +340,7 @@ QuadAccessor<dim>::child (const unsigned int i) const {
 template <int dim>
 inline
 int QuadAccessor<dim>::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<dim,LineAccessor<dim> >
 HexAccessor<dim>::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<dim>::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<dim,LineAccessor<dim> >(tria, -1, -1, 0);
 };
 
@@ -521,7 +521,7 @@ template <int dim>
 inline
 unsigned int
 HexAccessor<dim>::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<dim>::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 <int dim>
 inline
 unsigned int
 HexAccessor<dim>::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 <int dim>
 inline
 TriaIterator<dim,HexAccessor<dim> >
 HexAccessor<dim>::child (const unsigned int i) const {
-  Assert (i<6, ExcInvalidIndex(i,0,5));
+  Assert (i<6, ExcIndexRange(i,0,6));
   
   TriaIterator<dim,HexAccessor<dim> > q (tria, present_level+1, child_index (i));
   
@@ -577,7 +577,7 @@ HexAccessor<dim>::child (const unsigned int i) const {
 template <int dim>
 inline
 int HexAccessor<dim>::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;
 };
 
index c040ab8f3e2568014a0afbf3b1aee102fad64fe0..1b77d9b28993bff4717ee308dac5727178e181ab 100644 (file)
@@ -472,15 +472,17 @@ class TriaRawIterator : public bidirectional_iterator<Accessor,int> {
                                      * 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 <typename SomeAccessor>
-    friend class TriaRawIterator<dim,SomeAccessor>;
-
-    template <typename SomeAccessor>
-    friend class TriaIterator<dim,SomeAccessor>;
-
-    template <typename SomeAccessor>
-    friend class TriaActiveIterator<dim,SomeAccessor>;
+    template <int anydim, typename SomeAccessor> friend class TriaRawIterator;
+    template <int anydim, typename SomeAccessor> friend class TriaIterator;
+    template <int anydim, typename SomeAccessor> friend class TriaActiveIterator;
 };
 
 
index b3ccf0d7127b948e0d38c15df01f6e4e8482f122..774ef28cea6e414d3e4e374f07a7e3f59d96737e 100644 (file)
@@ -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
index 3ed4292710d15334860f88f24dc7997f32aa3543..2fcea190abafafd02994ef3276e55590611f30c6 100644 (file)
@@ -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
index beafcd86b724aa8ec0e5d99d8ff5321cb9b16257..85999c456912ef94b6fe6822e317b5c18850d2b5 100644 (file)
@@ -184,15 +184,6 @@ class KellyErrorEstimator {
                          Vector<float>            &error,
                          const Function<dim>      *coefficient = 0,
                          const unsigned int        selected_component = 0);
-
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotImplemented);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcInternalError);
                                     /**
                                      * Exception
                                      */
index 2917c41584c25b7e50fdde86afe8fefaf1af0601..fb22ee39620bf3f248c57c5d3a666e6fd6d02e5b 100644 (file)
@@ -307,16 +307,6 @@ class MatrixCreator
     static void create_interpolation_matrix(const FiniteElement<dim> &high,
                                            const FiniteElement<dim> &low,
                                            FullMatrix<double>& result);
-
-
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotImplemented);
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcInternalError);
 };
 
 
index 65c1c5e24caddf5e05665ce50930f9b1ec718026..36e5939550f9e70e833a82f77c11cc6513b14762 100644 (file)
@@ -308,11 +308,6 @@ class SolutionTransfer
                   int, int,
                   << "The size of the vector is " << arg1
                   << "although it should be " << arg2 << ".");
-    
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0(ExcInternalError);
                                  
   private:
 
index 72190f04ba3c35cf3d4d0d540497aa0e3b6d6a7d..ca52e7030340a323c908ab5f396edcb42b84af34 100644 (file)
@@ -895,10 +895,6 @@ class TimeStepBase : public Subscriptor
                                      */
     double get_forward_timestep () const;
     
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcInternalError);
                                     /**
                                      * Exception
                                      */
@@ -1385,10 +1381,6 @@ struct TimeStepBase_Tria<dim>::Flags
     DeclException1 (ExcInvalidParameter,
                    int,
                    << "The parameter " << arg1 << " has an invalid value.");
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcInternalError);
 };
 
 
index 315d5b8e741cfd13360deb986278cdaa177c7e4e..eff97cd674faaa3103b5e4c014ce0f26a93a3f10 100644 (file)
@@ -441,10 +441,6 @@ class VectorTools //<dim>
                                      const NormType           &norm);
     
 
-                                    /**
-                                     * Exception
-                                     */
-    DeclException0 (ExcNotImplemented);
                                     /**
                                      * Exception
                                      */
index 33787933cdc46fc55a091c9761a6688f86a5bd09..ab4c0f38f577a95612a29b3aff1db02738afe803 100644 (file)
@@ -33,7 +33,7 @@ void DoFLineAccessor<dim,BaseClass>::set_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
   Assert (i<dof_handler->selected_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<dim,BaseClass>::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 (i<dof_handler->selected_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<dim,BaseClass>::set_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
   Assert (i<dof_handler->selected_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<dim,BaseClass>::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 (i<dof_handler->selected_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<dim,BaseClass>::set_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (dof_handler->selected_fe != 0, ExcInvalidObject());
   Assert (i<dof_handler->selected_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<dim,BaseClass>::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 (i<dof_handler->selected_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 +
index d6fd3b0b2445aa06160a9d3d78252609f555d2c9..2807fd47e10303f03b659ee8737f83f76dc60fa4 100644 (file)
@@ -27,7 +27,7 @@ MGDoFLineAccessor<dim,BaseClass>::MGDoFLineAccessor (Triangulation<dim> *tria,
                                                     const int           index,
                                                     const AccessorData *local_data) :
                MGDoFAccessor<dim> (local_data),
-               DoFLineAccessor(tria,level,index,local_data) {};
+               DoFLineAccessor<dim,BaseClass>(tria,level,index,local_data) {};
 
 
 
@@ -39,7 +39,7 @@ int MGDoFLineAccessor<dim,BaseClass>::mg_dof_index (const unsigned int i) const
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::set_mg_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::child (const unsigned int i) const {
 template <int dim, typename BaseClass>
 void
 MGDoFLineAccessor<dim,BaseClass>::copy_from (const MGDoFLineAccessor<dim,BaseClass> &a) {
-  DoFLineAccessor::copy_from (a);
+  DoFLineAccessor<dim,BaseClass>::copy_from (a);
   set_mg_dof_handler (a.mg_dof_handler);
 };
 
@@ -157,7 +157,7 @@ MGDoFQuadAccessor<dim,BaseClass>::MGDoFQuadAccessor (Triangulation<dim> *tria,
                                                     const int           index,
                                                     const AccessorData *local_data) :
                MGDoFAccessor<dim> (local_data),
-               DoFQuadAccessor(tria,level,index,local_data) {};
+               DoFQuadAccessor<dim,BaseClass>(tria,level,index,local_data) {};
 
 
 
@@ -170,7 +170,7 @@ int MGDoFQuadAccessor<dim,BaseClass>::mg_dof_index (const unsigned int i) const
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::set_mg_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices)
 template <int dim, typename BaseClass>
 TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
 MGDoFQuadAccessor<dim,BaseClass>::line (const unsigned int i) const {
-  Assert (i<4, ExcInvalidIndex (i, 0, 4));
+  Assert (i<4, ExcIndexRange (i, 0, 4));
 
   return TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
     (
@@ -292,7 +292,7 @@ MGDoFQuadAccessor<dim,BaseClass>::child (const unsigned int i) const {
 template <int dim, typename BaseClass>
 void
 MGDoFQuadAccessor<dim,BaseClass>::copy_from (const MGDoFQuadAccessor<dim,BaseClass> &a) {
-  DoFQuadAccessor::copy_from (a);
+  DoFQuadAccessor<dim,BaseClass>::copy_from (a);
   set_mg_dof_handler (a.mg_dof_handler);
 };
 
@@ -307,7 +307,7 @@ MGDoFHexAccessor<dim,BaseClass>::MGDoFHexAccessor (Triangulation<dim> *tria,
                                                   const int           index,
                                                   const AccessorData *local_data) :
                MGDoFAccessor<dim> (local_data),
-               DoFHexAccessor(tria,level,index,local_data) {};
+               DoFHexAccessor<dim,BaseClass>(tria,level,index,local_data) {};
 
 
 
@@ -320,7 +320,7 @@ int MGDoFHexAccessor<dim,BaseClass>::mg_dof_index (const unsigned int i) const {
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::set_mg_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) c
 template <int dim, typename BaseClass>
 TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
 MGDoFHexAccessor<dim,BaseClass>::line (const unsigned int i) const {
-  Assert (i<12, ExcInvalidIndex (i, 0, 12));
+  Assert (i<12, ExcIndexRange (i, 0, 12));
 
   return TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
     (
@@ -430,7 +430,7 @@ MGDoFHexAccessor<dim,BaseClass>::line (const unsigned int i) const {
 template <int dim, typename BaseClass>
 TriaIterator<dim,MGDoFQuadAccessor<dim,QuadAccessor<dim> > >
 MGDoFHexAccessor<dim,BaseClass>::quad (const unsigned int i) const {
-  Assert (i<12, ExcInvalidIndex (i, 0, 6));
+  Assert (i<12, ExcIndexRange (i, 0, 6));
 
   return TriaIterator<dim,MGDoFQuadAccessor<dim,QuadAccessor<dim> > >
     (
@@ -463,7 +463,7 @@ MGDoFHexAccessor<dim,BaseClass>::child (const unsigned int i) const {
 template <int dim, typename BaseClass>
 void
 MGDoFHexAccessor<dim,BaseClass>::copy_from (const MGDoFHexAccessor<dim,BaseClass> &a) {
-  DoFHexAccessor::copy_from (a);
+  DoFHexAccessor<dim,BaseClass>::copy_from (a);
   set_mg_dof_handler (a.mg_dof_handler);
 };
 
index 2bcd5c41d56f495db76842fa2fdb7d62f58ba170..3efee16c5ddf715c13124d03eea4aebfd911d772 100644 (file)
@@ -181,16 +181,16 @@ void FEQ3<1>::get_unit_support_points (vector<Point<1> > &unit_points) const {
 
 
 template <>
-void FEQ3<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell,
-                                       vector<Point<1> >  &support_points) const {
+void FEQ3<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell,
+                                 vector<Point<1> >  &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<Point<1> >  &) const {
+void FEQ3<1>::get_face_support_points (const DoFHandler<1>::face_iterator &,
+                                      vector<Point<1> >  &) 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<double> &local_mass_matrix) const {
+                                    FullMatrix<double> &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<Point<2> > &unit_points) const {
 
 
 template <>
-void FEQ3<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &cell,
-                                       vector<Point<2> >  &support_points) const {
+void FEQ3<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell,
+                                 vector<Point<2> >  &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<Point<2> >  &support_points) const {
+void FEQ3<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face,
+                                      vector<Point<2> >  &support_points) const {
   Assert (support_points.size() == dofs_per_face,
          ExcWrongFieldDimension (support_points.size(), dofs_per_face));
 
index 42a1e984b47ef9d969169b23ef893c4464d268bd..10aef4f63ab1915ac50e3b215db439c26b3e56df 100644 (file)
@@ -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<Point<1> >  &) const {
+FEDG_Q0<1>::get_face_support_points (const DoFHandler<1>::face_iterator &,
+                                    vector<Point<1> >  &) const {
   Assert (false, ExcInternalError());
 };
 
@@ -93,7 +93,7 @@ double
 FEDG_Q0<dim>::shape_value (const unsigned int i,
                                const Point<dim>&) const
 {
-  Assert((i<total_dofs), ExcInvalidIndex(i));
+  Assert((i<total_dofs), ExcIndexRange(i, 0, total_dofs));
   return 1.;
 };
 
@@ -105,7 +105,7 @@ Tensor<1,dim>
 FEDG_Q0<dim>::shape_grad (const unsigned int i,
                               const Point<dim>&) const
 {
-  Assert((i<total_dofs), ExcInvalidIndex(i));
+  Assert((i<total_dofs), ExcIndexRange(i, 0, total_dofs));
   return Tensor<1,dim> ();
 };
 
@@ -117,7 +117,7 @@ Tensor<2,dim>
 FEDG_Q0<dim>::shape_grad_grad (const unsigned int i,
                                  const Point<dim> &) const
 {
-  Assert((i<total_dofs), ExcInvalidIndex(i));
+  Assert((i<total_dofs), ExcIndexRange(i, 0, total_dofs));
 
   return Tensor<2,dim>();
 };
index 92e18c8ef28261fc69e0a9df5677ff578b82a4fb..dd68f443ba7542ca89e52a1ca958bd2c49d30c9b 100644 (file)
@@ -126,16 +126,16 @@ void FEQ1<1>::get_unit_support_points (vector<Point<1> >  &support_points) const
 
 
 template <>
-void FEQ1<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell,
-                                     vector<Point<1> >  &support_points) const {
+void FEQ1<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell,
+                                 vector<Point<1> >  &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<Point<1> >  &) const {
+void FEQ1<1>::get_face_support_points (const DoFHandler<1>::face_iterator &,
+                                      vector<Point<1> >  &) const {
   Assert (false, ExcInternalError());
 };
 
index 58118041be8e9629307f390534531054dfcca897..c16f5e83da1aaee83c1b00a64f241b8c1d58bb44 100644 (file)
@@ -192,16 +192,16 @@ void FEQ2<1>::get_unit_support_points (vector<Point<1> > &unit_points) const {
 
 
 template <>
-void FEQ2<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell,
-                                           vector<Point<1> >  &support_points) const {
+void FEQ2<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell,
+                                 vector<Point<1> >  &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<Point<1> >  &) const {
+void FEQ2<1>::get_face_support_points (const DoFHandler<1>::face_iterator &,
+                                      vector<Point<1> >  &) const {
   Assert (false, ExcInternalError());
 };
 
@@ -1075,8 +1075,8 @@ void FEQ2<2>::get_unit_support_points (vector<Point<2> > &unit_points) const {
   
 
 template <>
-void FEQ2<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &cell,
-                                           vector<Point<2> >  &support_points) const {
+void FEQ2<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell,
+                                 vector<Point<2> >  &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<Point<2> >  &support_points) const {
+void FEQ2<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face,
+                                      vector<Point<2> >  &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<Point<3> > &unit_points) const {
   
 
 template <>
-void FEQ2<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &cell,
-                                           vector<Point<3> >  &support_points) const {
+void FEQ2<3>::get_support_points (const DoFHandler<3>::cell_iterator &cell,
+                                 vector<Point<3> >  &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<Point<3> >  &support_points) const {
+void FEQ2<3>::get_face_support_points (const DoFHandler<3>::face_iterator &face,
+                                      vector<Point<3> >  &support_points) const {
   Assert (support_points.size() == dofs_per_face,
          ExcWrongFieldDimension (support_points.size(), dofs_per_face));
 
index 26c4eac9fb3ed9b4112fb9e86b7aff6b69032665..c30683eb3aeba6bcc7d864753535991d373abd2f 100644 (file)
@@ -148,16 +148,16 @@ void FEQ4<1>::get_unit_support_points (vector<Point<1> > &unit_points) const {
 
 
 template <>
-void FEQ4<1>::get_support_points (const typename DoFHandler<1>::cell_iterator &cell,
-                                         vector<Point<1> >  &support_points) const {
+void FEQ4<1>::get_support_points (const DoFHandler<1>::cell_iterator &cell,
+                                 vector<Point<1> >  &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<Point<1> >  &) const {
+void FEQ4<1>::get_face_support_points (const DoFHandler<1>::face_iterator &,
+                                      vector<Point<1> >  &) const {
   Assert (false, ExcInternalError());
 };
 
@@ -2636,8 +2636,8 @@ void FEQ4<2>::get_unit_support_points (vector<Point<2> > &unit_points) const {
 
 
 template <>
-void FEQ4<2>::get_support_points (const typename DoFHandler<2>::cell_iterator &cell,
-                                         vector<Point<2> >  &support_points) const {
+void FEQ4<2>::get_support_points (const DoFHandler<2>::cell_iterator &cell,
+                                 vector<Point<2> >  &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<Point<2> >  &support_points) const {
+void FEQ4<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face,
+                                      vector<Point<2> >  &support_points) const {
   Assert (support_points.size() == dofs_per_face,
          ExcWrongFieldDimension (support_points.size(), dofs_per_face));
 
index e5fb7b154155b62494399cbf9aca33438d6b0bdd..389714d6435d3d0f9831b2a324c4e05873bb809b 100644 (file)
@@ -519,7 +519,7 @@ double
 FESystem<dim>::shape_value (const unsigned int i,
                            const Point<dim>  &p) const
 {
-  Assert((i<total_dofs), ExcInvalidIndex(i));
+  Assert((i<total_dofs), ExcIndexRange(i, 0, total_dofs));
 
   pair<unsigned,unsigned> comp = system_to_component_index(i);
   
@@ -534,7 +534,7 @@ Tensor<1,dim>
 FESystem<dim>::shape_grad (const unsigned int  i,
                           const Point<dim>   &p) const
 {
-  Assert((i<total_dofs), ExcInvalidIndex(i));
+  Assert((i<total_dofs), ExcIndexRange(i, 0, total_dofs));
 
   pair<unsigned,unsigned> comp = system_to_component_index(i);
   
@@ -549,7 +549,7 @@ Tensor<2,dim>
 FESystem<dim>::shape_grad_grad (const unsigned int  i,
                                const Point<dim>   &p) const
  {
-  Assert((i<total_dofs), ExcInvalidIndex(i));
+  Assert((i<total_dofs), ExcIndexRange(i, 0, total_dofs));
 
 
   pair<unsigned,unsigned> comp = system_to_component_index(i);
index 07c8581ce151e60c3a87d49107753f437e9622fb..4fdf47e8980efa174060f93ecf1d939488306540 100644 (file)
@@ -51,11 +51,11 @@ template <int dim>
 double FEValuesBase<dim>::shape_value (const unsigned int i,
                                       const unsigned int j) const {
   Assert (selected_dataset<shape_values.size(),
-         ExcInvalidIndex (selected_dataset, shape_values.size()));
+         ExcIndexRange (selected_dataset, 0, shape_values.size()));
   Assert (i<shape_values[selected_dataset].m(),
-         ExcInvalidIndex (i, shape_values[selected_dataset].m()));
+         ExcIndexRange (i, 0, shape_values[selected_dataset].m()));
   Assert (j<shape_values[selected_dataset].n(),
-         ExcInvalidIndex (j, shape_values[selected_dataset].n()));
+         ExcIndexRange (j, 0, shape_values[selected_dataset].n()));
 
   return shape_values[selected_dataset](i,j);
 };
@@ -454,7 +454,7 @@ FEFaceValuesBase<dim>::FEFaceValuesBase (const unsigned int n_q_points,
 template <int dim>
 const Point<dim> &
 FEFaceValuesBase<dim>::normal_vector (const unsigned int i) const {
-  Assert (i<normal_vectors.size(), ExcInvalidIndex(i, normal_vectors.size()));
+  Assert (i<normal_vectors.size(), ExcIndexRange(i, 0, normal_vectors.size()));
   Assert (update_flags & update_normal_vectors,
          ExcAccessToUninitializedField());
   
diff --git a/deal.II/deal.II/source/grid/geometry_info.cc b/deal.II/deal.II/source/grid/geometry_info.cc
new file mode 100644 (file)
index 0000000..b68cc09
--- /dev/null
@@ -0,0 +1,15 @@
+/* $Id$ */
+
+#include <grid/geometry_info.h>
+
+
+// enable these lines for gcc2.95
+//
+//const unsigned int GeometryInfo<deal_II_dimension>::vertices_per_cell;
+//const unsigned int GeometryInfo<deal_II_dimension>::lines_per_cell;
+//const unsigned int GeometryInfo<deal_II_dimension>::quads_per_cell;
+//const unsigned int GeometryInfo<deal_II_dimension>::hexes_per_cell;
+//const unsigned int GeometryInfo<deal_II_dimension>::children_per_cell;
+
+
+
index 770f021f507c474b52a539140b593af767cbeb7c..86ffd9510f1e326844ab624ba3ed4ba92a55f9eb 100644 (file)
@@ -28,7 +28,7 @@ void LineAccessor<dim>::set (const Line &line) const {
 
 template <int dim>
 int LineAccessor<dim>::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<dim>::set (const Quad &quad) const {
 
 template <int dim>
 int QuadAccessor<dim>::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<dim>::set (const Hexahedron &hex) const {
 
 template <int dim>
 int HexAccessor<dim>::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 <int dim>
 bool CellAccessor<dim>::at_boundary (const unsigned int i) const {
   Assert (used(), typename TriaSubstructAccessor<dim>::ExcCellNotUsed());
   Assert (i<GeometryInfo<dim>::faces_per_cell,
-         typename TriaSubstructAccessor<dim>::
-         ExcInvalidIndex (i,0,GeometryInfo<dim>::faces_per_cell-1));
+         ExcIndexRange (i,0,GeometryInfo<dim>::faces_per_cell));
   
   return (neighbor_index(i) == -1);
 };
index d6fd3b0b2445aa06160a9d3d78252609f555d2c9..2807fd47e10303f03b659ee8737f83f76dc60fa4 100644 (file)
@@ -27,7 +27,7 @@ MGDoFLineAccessor<dim,BaseClass>::MGDoFLineAccessor (Triangulation<dim> *tria,
                                                     const int           index,
                                                     const AccessorData *local_data) :
                MGDoFAccessor<dim> (local_data),
-               DoFLineAccessor(tria,level,index,local_data) {};
+               DoFLineAccessor<dim,BaseClass>(tria,level,index,local_data) {};
 
 
 
@@ -39,7 +39,7 @@ int MGDoFLineAccessor<dim,BaseClass>::mg_dof_index (const unsigned int i) const
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::set_mg_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::child (const unsigned int i) const {
 template <int dim, typename BaseClass>
 void
 MGDoFLineAccessor<dim,BaseClass>::copy_from (const MGDoFLineAccessor<dim,BaseClass> &a) {
-  DoFLineAccessor::copy_from (a);
+  DoFLineAccessor<dim,BaseClass>::copy_from (a);
   set_mg_dof_handler (a.mg_dof_handler);
 };
 
@@ -157,7 +157,7 @@ MGDoFQuadAccessor<dim,BaseClass>::MGDoFQuadAccessor (Triangulation<dim> *tria,
                                                     const int           index,
                                                     const AccessorData *local_data) :
                MGDoFAccessor<dim> (local_data),
-               DoFQuadAccessor(tria,level,index,local_data) {};
+               DoFQuadAccessor<dim,BaseClass>(tria,level,index,local_data) {};
 
 
 
@@ -170,7 +170,7 @@ int MGDoFQuadAccessor<dim,BaseClass>::mg_dof_index (const unsigned int i) const
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::set_mg_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices)
 template <int dim, typename BaseClass>
 TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
 MGDoFQuadAccessor<dim,BaseClass>::line (const unsigned int i) const {
-  Assert (i<4, ExcInvalidIndex (i, 0, 4));
+  Assert (i<4, ExcIndexRange (i, 0, 4));
 
   return TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
     (
@@ -292,7 +292,7 @@ MGDoFQuadAccessor<dim,BaseClass>::child (const unsigned int i) const {
 template <int dim, typename BaseClass>
 void
 MGDoFQuadAccessor<dim,BaseClass>::copy_from (const MGDoFQuadAccessor<dim,BaseClass> &a) {
-  DoFQuadAccessor::copy_from (a);
+  DoFQuadAccessor<dim,BaseClass>::copy_from (a);
   set_mg_dof_handler (a.mg_dof_handler);
 };
 
@@ -307,7 +307,7 @@ MGDoFHexAccessor<dim,BaseClass>::MGDoFHexAccessor (Triangulation<dim> *tria,
                                                   const int           index,
                                                   const AccessorData *local_data) :
                MGDoFAccessor<dim> (local_data),
-               DoFHexAccessor(tria,level,index,local_data) {};
+               DoFHexAccessor<dim,BaseClass>(tria,level,index,local_data) {};
 
 
 
@@ -320,7 +320,7 @@ int MGDoFHexAccessor<dim,BaseClass>::mg_dof_index (const unsigned int i) const {
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::set_mg_dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
   Assert (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::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 (i<dof_handler->get_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<dim,BaseClass>::get_mg_dof_indices (vector<int> &dof_indices) c
 template <int dim, typename BaseClass>
 TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
 MGDoFHexAccessor<dim,BaseClass>::line (const unsigned int i) const {
-  Assert (i<12, ExcInvalidIndex (i, 0, 12));
+  Assert (i<12, ExcIndexRange (i, 0, 12));
 
   return TriaIterator<dim,MGDoFLineAccessor<dim,LineAccessor<dim> > >
     (
@@ -430,7 +430,7 @@ MGDoFHexAccessor<dim,BaseClass>::line (const unsigned int i) const {
 template <int dim, typename BaseClass>
 TriaIterator<dim,MGDoFQuadAccessor<dim,QuadAccessor<dim> > >
 MGDoFHexAccessor<dim,BaseClass>::quad (const unsigned int i) const {
-  Assert (i<12, ExcInvalidIndex (i, 0, 6));
+  Assert (i<12, ExcIndexRange (i, 0, 6));
 
   return TriaIterator<dim,MGDoFQuadAccessor<dim,QuadAccessor<dim> > >
     (
@@ -463,7 +463,7 @@ MGDoFHexAccessor<dim,BaseClass>::child (const unsigned int i) const {
 template <int dim, typename BaseClass>
 void
 MGDoFHexAccessor<dim,BaseClass>::copy_from (const MGDoFHexAccessor<dim,BaseClass> &a) {
-  DoFHexAccessor::copy_from (a);
+  DoFHexAccessor<dim,BaseClass>::copy_from (a);
   set_mg_dof_handler (a.mg_dof_handler);
 };
 
index 71079f25957cfc2ec2620cadbef7e420a8da9ec3..87a36858a8106f50294919f1e31291c50f97d0d8 100644 (file)
@@ -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<DataOut<2>::EpsCellData>::iterator c=cells.begin();
+   for(multiset<DataOut<2>::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<DataOut<2>::EpsCellData>::iterator c=cells.begin();c!=cells.end();++c)
+       for (multiset<DataOut<2>::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<DataOut<2>::EpsCellData>::iterator c=cells2.begin();
+   for (multiset<DataOut<2>::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<DataOut<2>::EpsCellData>::iterator c=cells.begin();
+   for (multiset<DataOut<2>::EpsCellData>::iterator c=cells.begin();
        c!=cells.end(); ++c)
      {
        if (cell_data_p || cell_shade_p)
index 5b7251b035f30ffdbc8407e8c16b89eb6331669a..09a46ebdc0181fdeecbd224313fa07ac6809b4c1 100644 (file)
@@ -72,9 +72,15 @@ void Histogram::evaluate (const vector<Vector<number> > &values,
       case logarithmic:
            min_value = *min_element(values[0].begin(),
                                     values[0].end(),
+                                                                     // for gcc2.95
+//                                  &Histogram::template logarithmic_less<number>);
+                                                                     // for egcs1.1.2
                                     &logarithmic_less<number>);
            max_value = *max_element(values[0].begin(),
                                     values[0].end(),
+                                                                     // for gcc2.95
+//                                  &Histogram::template logarithmic_less<number>);
+                                                                     // for egcs1.1.2
                                     &logarithmic_less<number>);
 
            for (unsigned int i=1; i<values.size(); ++i)
@@ -82,12 +88,25 @@ void Histogram::evaluate (const vector<Vector<number> > &values,
                min_value = min (min_value,
                                 *min_element(values[i].begin(),
                                              values[i].end(),
+                                                                     // for gcc2.95
+//                                           &Histogram::template logarithmic_less<number>);
+                                                                     // for egcs1.1.2
                                              &logarithmic_less<number>),
+                                                                     // for gcc2.95
+//                                  &Histogram::template logarithmic_less<number>);
+                                                                     // for egcs1.1.2
                                 &logarithmic_less<number>);
                max_value = max (max_value,
                                 *max_element(values[i].begin(),
                                              values[i].end(),
-                                             &logarithmic_less<number>));
+                                                                     // for gcc2.95
+//                                           &Histogram::template logarithmic_less<number>);
+                                                                     // for egcs1.1.2
+                                             &logarithmic_less<number>),
+                                                                     // for gcc2.95
+//                              &Histogram::template logarithmic_less<number>);
+                                                                     // for egcs1.1.2
+                                &logarithmic_less<number>);
              };
            
            break;
index 9ae672f09eef8d13ac7e64158ef720c1baa7c52b..d3834cd23ef977ae5ef644a7a3b1f980647c538f 100644 (file)
@@ -569,10 +569,11 @@ void MassMatrix<dim>::assemble (FullMatrix<double>      &cell_matrix,
                     n_q_points = fe_values.n_quadrature_points;
 
   Assert (cell_matrix.n() == total_dofs,
-         ExcWrongSize(cell_matrix.n(), total_dofs));
+         Equation<dim>::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<dim>::ExcWrongSize(cell_matrix.m(), total_dofs));
+  Assert (cell_matrix.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
   
   const FullMatrix<double> &values    = fe_values.get_shape_values ();
   const vector<double>     &weights   = fe_values.get_JxW_values ();
@@ -613,13 +614,15 @@ void MassMatrix<dim>::assemble (FullMatrix<double>  &cell_matrix,
                     n_q_points = fe_values.n_quadrature_points;
 
   Assert (cell_matrix.n() == total_dofs,
-         ExcWrongSize(cell_matrix.n(), total_dofs));
+         Equation<dim>::ExcWrongSize(cell_matrix.n(), total_dofs));
   Assert (cell_matrix.m() == total_dofs,
-         ExcWrongSize(cell_matrix.m(), total_dofs));
+         Equation<dim>::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<dim>::ExcWrongSize(rhs.size(), total_dofs));
+  Assert (cell_matrix.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
+  Assert (rhs.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
 
   const FullMatrix<double> &values    = fe_values.get_shape_values ();
   const vector<double>     &weights   = fe_values.get_JxW_values ();
@@ -669,8 +672,10 @@ void MassMatrix<dim>::assemble (Vector<double>      &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<dim>::ExcWrongSize(rhs.size(), total_dofs));
+  Assert (rhs.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
 
   const FullMatrix<double> &values    = fe_values.get_shape_values ();
   const vector<double>     &weights   = fe_values.get_JxW_values ();
@@ -707,13 +712,15 @@ void LaplaceMatrix<dim>::assemble (FullMatrix<double>         &cell_matrix,
                     n_q_points = fe_values.n_quadrature_points;
 
   Assert (cell_matrix.n() == total_dofs,
-         ExcWrongSize(cell_matrix.n(), total_dofs));
+         Equation<dim>::ExcWrongSize(cell_matrix.n(), total_dofs));
   Assert (cell_matrix.m() == total_dofs,
-         ExcWrongSize(cell_matrix.m(), total_dofs));
+         Equation<dim>::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<dim>::ExcWrongSize(rhs.size(), total_dofs));
+  Assert (cell_matrix.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
+  Assert (rhs.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
 
   const vector<vector<Tensor<1,dim> > >&gradients = fe_values.get_shape_grads ();
   const FullMatrix<double>             &values    = fe_values.get_shape_values ();
@@ -764,10 +771,11 @@ void LaplaceMatrix<dim>::assemble (FullMatrix<double>  &cell_matrix,
                     n_q_points = fe_values.n_quadrature_points;
 
   Assert (cell_matrix.n() == total_dofs,
-         ExcWrongSize(cell_matrix.n(), total_dofs));
+         Equation<dim>::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<dim>::ExcWrongSize(cell_matrix.m(), total_dofs));
+  Assert (cell_matrix.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
   
   const vector<vector<Tensor<1,dim> > >&gradients = fe_values.get_shape_grads ();
   const vector<double> &weights   = fe_values.get_JxW_values ();
@@ -805,8 +813,10 @@ void LaplaceMatrix<dim>::assemble (Vector<double>      &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<dim>::ExcWrongSize(rhs.size(), total_dofs));
+  Assert (rhs.all_zero(),
+         Equation<dim>::ExcObjectNotEmpty());
 
   const FullMatrix<double> &values    = fe_values.get_shape_values ();
   const vector<double>     &weights   = fe_values.get_JxW_values ();
index 2b59d6ba477efa55d8ffff380999a22aa9a43934..a3dab8bc614fff5d43343d9390729f04fb67a356 100644 (file)
@@ -192,19 +192,19 @@ class SolverDual : public Solver<Matrix, Vector>
                                      * Solve the original problem
                                      * $Ax=b$.
                                      */
-    ReturnState solve (const Matrix &A,
-                              Vector       &x,
-                              const Vector &b) = 0;
+    typename Solver<Matrix,Vector>::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<Matrix,Vector>::ReturnState solve (const Matrix &A,
+                                                      Vector       &x,
+                                                      const Vector &b1,
+                                                      Vector       &z,
+                                                      const Vector &b2) = 0;
 };
 
 
index 17e2154f232d8926b211dee1846d85b3fa659e79..d8e11ce3ca0693702bd0664a8078f7af8e1b0860 100644 (file)
@@ -49,10 +49,10 @@ class SolverBicgstab : public Solver<Matrix,Vector>
                                      * Solve primal problem only.
                                      */
     template<class Preconditioner>
-    ReturnState solve (const Matrix &A,
-                      Vector       &x,
-                      const Vector &b,
-                      const Preconditioner& precondition);
+    typename Solver<Matrix,Vector>::ReturnState solve (const Matrix &A,
+                                                      Vector       &x,
+                                                      const Vector &b,
+                                                      const Preconditioner& precondition);
 
   protected:
                                     /**
@@ -181,9 +181,11 @@ SolverBicgstab<Matrix, Vector>::start()
   return state;
 }
 
+
+
 template<class Matrix, class Vector>
 template<class Preconditioner>
-Solver<Matrix,Vector>::ReturnState
+typename Solver<Matrix,Vector>::ReturnState
 SolverBicgstab<Matrix, Vector>::iterate(const Preconditioner& precondition)
 {
   SolverControl::State state = SolverControl::iterate;
index 811e271a8c188adc808ea6cd6b4184124b4638c9..d58d0be0b3a8a3e73d38f73649aba43b61a4754d 100644 (file)
@@ -56,7 +56,8 @@ class SolverCG : public Solver<Matrix,Vector>
                                      * Solver method.
                                      */
     template<class Preconditioner>
-    ReturnState solve (const Matrix &A,
+    typename Solver<Matrix,Vector>::ReturnState
+    solve (const Matrix &A,
                       Vector       &x,
                       const Vector &b,
                       const Preconditioner& precondition);
@@ -113,11 +114,11 @@ SolverCG<Matrix,Vector>::criterion()
 
 template<class Matrix, class Vector>
 template<class Preconditioner>
-Solver<Matrix,Vector>::ReturnState 
+typename Solver<Matrix,Vector>::ReturnState 
 SolverCG<Matrix,Vector>::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;
 
index c5cd615dba3aa141b23163500e72f9c053c7d475..fe4947f98eab741e4697aac891424b14142a16f5 100644 (file)
@@ -98,10 +98,10 @@ class SolverGMRES : public Solver<Matrix, Vector>
                                      * Solver method.
                                      */
     template<class Preconditioner>
-    ReturnState solve (const Matrix &A,
-                      Vector       &x,
-                      const Vector &b,
-                      const Preconditioner& precondition);
+    typename Solver<Matrix,Vector>::ReturnState solve (const Matrix &A,
+                                                      Vector       &x,
+                                                      const Vector &b,
+                                                      const Preconditioner& precondition);
 
     DeclException1 (ExcTooFewTmpVectors,
                    int,
@@ -183,7 +183,7 @@ SolverGMRES<Matrix,Vector>::givens_rotation (Vector &h,
 
 template<class Matrix, class Vector>
 template<class Preconditioner>
-Solver<Matrix,Vector>::ReturnState
+typename Solver<Matrix,Vector>::ReturnState
 SolverGMRES<Matrix,Vector>::solve (const Matrix& A,
                                   Vector      & x,
                                   const Vector& b,
index 36b1b13c5b6dc8533fb3aa05b09d57a64ca1600c..f2c2b18245bb895282ad686281ae31974892a414 100644 (file)
@@ -68,10 +68,10 @@ class SolverRichardson : public Solver<Matrix, Vector>
                                      * Solve $Ax=b$ for $x$.
                                      */
     template<class Preconditioner>
-    ReturnState solve (const Matrix &A,
-                      Vector       &x,
-                      const Vector &b,
-                      const Preconditioner& precondition);
+    typename Solver<Matrix,Vector>::ReturnState solve (const Matrix &A,
+                                                      Vector       &x,
+                                                      const Vector &b,
+                                                      const Preconditioner& precondition);
 
                                     /**
                                      * Set the damping-coefficient.
@@ -128,7 +128,7 @@ SolverRichardson<Matrix,Vector>::SolverRichardson(SolverControl &cn,
 
 template<class Matrix,class Vector>
 template<class Preconditioner>
-Solver<Matrix,Vector>::ReturnState 
+typename Solver<Matrix,Vector>::ReturnState 
 SolverRichardson<Matrix,Vector>::solve (const Matrix &A,
                                        Vector       &x,
                                        const Vector &b,
index 994d2eb8c02a1be21026f701a8a7191ad96832b6..cd1c1ff63a696496a57f912b90d6cd0e129392dc 100644 (file)
@@ -104,10 +104,10 @@ class SolverSelector
                                      * 
                                      */
     template<class Preconditioner>
-    Solver<Matrix,Vector>::ReturnState solve(const Matrix &A,
-                                            Vector &x,
-                                            const Vector &b,
-                                            const Preconditioner &precond) const;
+    typename Solver<Matrix,Vector>::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<Matrix, Vector>::~SolverSelector()
 
 template <class Matrix, class Vector>
 template<class Preconditioner>
-Solver<Matrix,Vector>::ReturnState 
+typename Solver<Matrix,Vector>::ReturnState 
 SolverSelector<Matrix, Vector>::solve(const Matrix &A,
                                      Vector &x,
                                      const Vector &b,
index f2fbec3589fcbd537d67aebe94466b4d25cde5e0..94c277dc9111aed5e05d46fc5f261f12c3a3b1b9 100644 (file)
@@ -1061,8 +1061,7 @@ class SparseMatrix : public Subscriptor
 
                                     // make all other sparse matrices
                                     // friends
-    template <typename somenumber> friend class SparseMatrix<somenumber>;
-
+    template <typename somenumber> friend class SparseMatrix;
 };
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.