]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Combine the various typedefs FunctionMap into one central place.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Apr 2001 15:58:04 +0000 (15:58 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Apr 2001 15:58:04 +0000 (15:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@4415 0785d39b-7218-0410-832d-ea1e28bc413d

17 files changed:
deal.II/deal.II/include/dofs/dof_handler.h
deal.II/deal.II/include/dofs/function_map.h [new file with mode: 0644]
deal.II/deal.II/include/numerics/error_estimator.h
deal.II/deal.II/include/numerics/matrices.h
deal.II/deal.II/include/numerics/vectors.h
deal.II/deal.II/source/numerics/error_estimator.cc
deal.II/deal.II/source/numerics/matrices.cc
deal.II/deal.II/source/numerics/vectors.cc
deal.II/doc/news/2001/c-3-1.html
deal.II/examples/step-6/step-6.cc
deal.II/examples/step-7/step-7.cc
deal.II/examples/step-8/step-8.cc
tests/big-tests/error-estimation/error-estimation.cc
tests/big-tests/multigrid/multigrid.cc
tests/big-tests/nonlinear/fixed-point-iteration/nonlinear.cc
tests/deal.II/matrices.cc
tests/deal.II/wave-test-3.cc

index c432d14e6b85e0e7b1a934b84642c847a43f3ba3..bddb9bb6f81764a3958ec7979562dbe5115b8421 100644 (file)
 #define __deal2__dof_handler_h
 
 
-/*----------------------------   dof.h     ---------------------------*/
 
+#include <base/exceptions.h>
+#include <base/smartpointer.h>
+#include <dofs/function_map.h>
 #include <vector>
 #include <map>
 #include <set>
-#include <base/exceptions.h>
-#include <base/smartpointer.h>
-
-template <int dim> class Function;
 
 template <int dim> class DoFCellAccessor;
 template <int dim> class DoFLevel;
@@ -245,16 +243,11 @@ class DoFHandler  :  public Subscriptor,
     typedef typename DoFDimensionInfo<dim>::active_face_iterator active_face_iterator;
 
                                     /**
-                                     * Declare a data type which denotes a
-                                     * mapping between a boundary indicator
-                                     * and the function denoting the boundary
-                                     * values on this part of the boundary.
-                                     * Only one boundary function may be given
-                                     * for each boundary indicator, which is
-                                     * guaranteed by the @p{map} data type.
+                                     * Alias the @p{FunctionMap} type
+                                     * declared elsewhere.
                                      */
-    typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
-
+    typedef typename FunctionMap<dim>::type FunctionMap;
+    
                                     /**
                                      * When the arrays holding the
                                      * DoF indices are set up, but
diff --git a/deal.II/deal.II/include/dofs/function_map.h b/deal.II/deal.II/include/dofs/function_map.h
new file mode 100644 (file)
index 0000000..ca6322c
--- /dev/null
@@ -0,0 +1,51 @@
+//----------------------------  function_map.h  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 1998, 1999, 2000, 2001 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  function_map.h  ---------------------------
+#ifndef __deal2__function_map_h
+#define __deal2__function_map_h
+
+#include <map>
+
+template <int dim> class Function;
+
+
+
+/**
+ * Declare a data type which denotes a mapping between a boundary
+ * indicator and the function denoting the boundary values on this
+ * part of the boundary. This type is required in many functions where
+ * depending on boundary indicators different functions are used,
+ * e.g. for boundary value interpolation, etc. As a variable of this
+ * type is often declared in certain contexts where these functions
+ * are used, this variable is also used by some functions that are not
+ * actually interested in the function pointer itself, but only in the
+ * list of selected boundary indicators.
+ *
+ * @author Wolfgang Bangerth, Ralf Hartmann, 2001
+ */
+template<int dim>
+struct FunctionMap
+{
+                                    /**
+                                     * Declare the type as discussed
+                                     * above. Since we can't name it
+                                     * @p{FunctionMap} (as that would
+                                     * ambiguate a possible
+                                     * constructor of this class),
+                                     * name it in the fashion of the
+                                     * STL local typedefs.
+                                     */
+    typedef typename std::map<unsigned char, const Function<dim>*> type;
+};
+
+
+#endif
index f58b695698f673336aa7f55bb4ada700cc463282..9f3dd89468f31f1cdcb8926da039f97943484354 100644 (file)
@@ -206,19 +206,6 @@ template <int dim>
 class KellyErrorEstimator
 {
   public:
-
-                                    /**
-                                     * Declare a data type which denotes a
-                                     * mapping between a boundary indicator
-                                     * and the function denoting the boundary
-                                     * values on this part of the boundary.
-                                     * Only one boundary function may be given
-                                     * for each boundary indicator, which is
-                                     * guaranteed by the @p{map} data type.
-                                     */    
-    typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
-
-
                                     /**
                                      * Implementation of the error
                                      * estimator described above. You
@@ -272,7 +259,7 @@ class KellyErrorEstimator
     static void estimate (const Mapping<dim>      &mapping,
                          const DoFHandler<dim>   &dof,
                          const Quadrature<dim-1> &quadrature,
-                         const FunctionMap       &neumann_bc,
+                         const typename FunctionMap<dim>::type &neumann_bc,
                          const Vector<double>    &solution,
                          Vector<float>           &error,
                          const std::vector<bool> &component_mask = std::vector<bool>(),
@@ -286,7 +273,7 @@ class KellyErrorEstimator
                                      */    
     static void estimate (const DoFHandler<dim>   &dof,
                          const Quadrature<dim-1> &quadrature,
-                         const FunctionMap       &neumann_bc,
+                         const typename FunctionMap<dim>::type &neumann_bc,
                          const Vector<double>    &solution,
                          Vector<float>           &error,
                          const std::vector<bool> &component_mask = std::vector<bool>(),
@@ -322,7 +309,7 @@ class KellyErrorEstimator
     static void estimate (const Mapping<dim>          &mapping,
                          const DoFHandler<dim>       &dof,
                          const Quadrature<dim-1>     &quadrature,
-                         const FunctionMap           &neumann_bc,
+                         const typename FunctionMap<dim>::type &neumann_bc,
                          const std::vector<const Vector<double>*> &solutions,
                          std::vector<Vector<float>*> &errors,
                          const std::vector<bool>     &component_mask = std::vector<bool>(),
@@ -336,7 +323,7 @@ class KellyErrorEstimator
                                      */    
     static void estimate (const DoFHandler<dim>       &dof,
                          const Quadrature<dim-1>     &quadrature,
-                         const FunctionMap           &neumann_bc,
+                         const typename FunctionMap<dim>::type &neumann_bc,
                          const std::vector<const Vector<double>*> &solutions,
                          std::vector<Vector<float>*> &errors,
                          const std::vector<bool>     &component_mask = std::vector<bool>(),
@@ -447,7 +434,7 @@ class KellyErrorEstimator
        const Mapping<dim>                  &mapping;
        const DoFHandler<dim>               &dof_handler;
        const Quadrature<dim-1>             &quadrature;
-       const FunctionMap                   &neumann_bc;
+       const typename FunctionMap<dim>::type &neumann_bc;
        const std::vector<const Vector<double>*> &solutions;
        const std::vector<bool>                   component_mask;
        const Function<dim>                 *coefficients;
@@ -533,7 +520,7 @@ class KellyErrorEstimator
        Data(const Mapping<dim>                  &mapping,
             const DoFHandler<dim>               &dof,
             const Quadrature<dim-1>             &quadrature,
-            const FunctionMap                   &neumann_bc,
+            const typename FunctionMap<dim>::type &neumann_bc,
             const std::vector<const Vector<double>*> &solutions,
             const std::vector<bool>                  &component_mask,
             const Function<dim>                 *coefficients,
index 9000db266a373b5d6bf1e37e32732b144ce952b7..a7a669649cb733b52deaec299cdf597b4bad6de7 100644 (file)
@@ -29,6 +29,7 @@ template <int dim> class Mapping;
 template <int dim> class DoFHandler;
 template <int dim> class MGDoFHandler;
 template <int dim> class FEValues;
+template <int dim> class FunctionMap;
 
 
 
@@ -131,12 +132,12 @@ template <int dim> class FEValues;
  * The @p{create_boundary_mass_matrix} creates the matrix with entries
  * $m_{ij} = \int_{\Gamma} \phi_i \phi_j dx$, where $\Gamma$ is the
  * union of boundary parts with indicators contained in a
- * @p{FunctionMap} passed to the function (i.e. if you want to set up
- * the mass matrix for the parts of the boundary with indicators zero
- * and 2, you pass the function a map of @p{unsigned char}s as
- * parameter @p{boundary_functions} containing the keys zero and
- * 2). The $\phi_i$ are the basis functions which have at least part
- * of their support on $\Gamma$. The mapping
+ * @ref{FunctioMap}@p{::FunctionMap} passed to the function (i.e. if
+ * you want to set up the mass matrix for the parts of the boundary
+ * with indicators zero and 2, you pass the function a map of
+ * @p{unsigned char}s as parameter @p{boundary_functions} containing
+ * the keys zero and 2). The $\phi_i$ are the basis functions which
+ * have at least part of their support on $\Gamma$. The mapping
  * @p{dof_to_boundary_mapping} required by this function maps global
  * DoF numbers to a numbering of the degrees of freedom located on the
  * boundary, and can be obtained using the function
@@ -187,21 +188,6 @@ template <int dim>
 class MatrixCreator
 {
   public:
-                                    /**
-                                     * Declare a data type which denotes a
-                                     * mapping between a boundary indicator
-                                     * and the function denoting the boundary
-                                     * values on this part of the boundary.
-                                     * Only one boundary function may be given
-                                     * for each boundary indicator, which is
-                                     * guaranteed by the @p{map} data type.
-                                     * 
-                                     * See the general documentation of this
-                                     * class for more detail.
-                                     */
-// TODO: [WB] use one global declaration of FunctionMap, rather than one in every place
-    typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
-
                                     /**
                                      * Assemble the mass matrix. If no 
                                      * coefficient is given, it is assumed
@@ -288,7 +274,7 @@ class MatrixCreator
                                      const DoFHandler<dim>    &dof,
                                      const Quadrature<dim-1>  &q,
                                      SparseMatrix<double>     &matrix,
-                                     const FunctionMap        &boundary_functions,
+                                     const typename FunctionMap<dim>::type        &boundary_functions,
                                      Vector<double>           &rhs_vector,
                                      std::vector<unsigned int>&dof_to_boundary_mapping,
                                      const Function<dim>      *a = 0);
@@ -303,7 +289,7 @@ class MatrixCreator
     void create_boundary_mass_matrix (const DoFHandler<dim>    &dof,
                                      const Quadrature<dim-1>  &q,
                                      SparseMatrix<double>     &matrix,
-                                     const FunctionMap        &boundary_functions,
+                                     const typename FunctionMap<dim>::type        &boundary_functions,
                                      Vector<double>           &rhs_vector,
                                      std::vector<unsigned int>&dof_to_boundary_mapping,
                                      const Function<dim>      *a = 0);
@@ -498,7 +484,7 @@ class MatrixCreator
                                        const DoFHandler<dim>    &dof,
                                        const Quadrature<dim-1>  &q,
                                        SparseMatrix<double>     &matrix,
-                                       const FunctionMap        &boundary_functions,
+                                       const typename FunctionMap<dim>::type        &boundary_functions,
                                        Vector<double>           &rhs_vector,
                                        std::vector<unsigned int>&dof_to_boundary_mapping,
                                        const Function<dim> * const a,
index c06eff447390339da3d0eadef589a4e4b7dd5251..24068ac11166046e26c017ccd6e58ffe86109041 100644 (file)
@@ -15,6 +15,7 @@
 #include <vector>
 
 template <int dim> class Function;
+template <int dim> class FunctionMap;
 template <int dim> class Quadrature;
 template <int dim> class QGauss2;
 
@@ -122,13 +123,14 @@ enum NormType {
  *   projection of the trace of the function to the boundary is done
  *   with the @ref{VectorTools}@p{::project_boundary_values} (see
  *   below) function, which is called with a map of boundary functions
- *   (@p{FunctionMap}) in which all boundary indicators from zero to
- *   254 (255 is used for other purposes, see the @ref{Triangulation}
- *   class documentation) point to the function to be projected. The
- *   projection to the boundary takes place using a second quadrature
- *   formula on the boundary given to the @p{project} function. The
- *   first quadrature formula is used to compute the right hand side
- *   and for numerical quadrature of the mass matrix.
+ *   (@ref{FunctioMap}@p{::FunctionMap}) in which all boundary
+ *   indicators from zero to 254 (255 is used for other purposes, see
+ *   the @ref{Triangulation} class documentation) point to the
+ *   function to be projected. The projection to the boundary takes
+ *   place using a second quadrature formula on the boundary given to
+ *   the @p{project} function. The first quadrature formula is used to
+ *   compute the right hand side and for numerical quadrature of the
+ *   mass matrix.
  *
  *   The projection of the boundary values first, then eliminating them from
  *   the global system of equations is not needed usually. It may be necessary
@@ -213,9 +215,10 @@ enum NormType {
  *   through the $L_2$-projection of the trace of the function to the boundary.
  *
  *   The projection takes place on all boundary parts with boundary
- *   indicators listed in the map (@p{FunctionMap}) of boundary
- *   functions. These boundary parts may or may not be continuous. For
- *   these boundary parts, the mass matrix is assembled using the
+ *   indicators listed in the map (@ref{FunctioMap}@p{::FunctionMap})
+ *   of boundary functions. These boundary parts may or may not be
+ *   continuous. For these boundary parts, the mass matrix is
+ *   assembled using the
  *   @ref{MatrixTools}@p{::create_boundary_mass_matrix} function, as
  *   well as the appropriate right hand side. Then the resulting
  *   system of equations is solved using a simple CG method (without
@@ -298,25 +301,6 @@ enum NormType {
 class VectorTools
 {
   public:
-                                    /**
-                                     * Declare a data type which denotes a
-                                     * mapping between a boundary indicator
-                                     * and the function denoting the boundary
-                                     * values on this part of the boundary.
-                                     * Only one boundary function may be given
-                                     * for each boundary indicator, which is
-                                     * guaranteed by the @p{map} data type.
-                                     * 
-                                     * See the general documentation of this
-                                     * class for more detail.
-                                     */
-// TODO: [WB] use one global declaration of FunctionMap, rather than one in every place
-    template<int dim>
-    struct FMap
-    {
-       typedef typename std::map<unsigned char,const Function<dim>*> FunctionMap;
-    };
-
                                     /**
                                      * Compute the interpolation of
                                      * @p{function} at the support
@@ -543,7 +527,7 @@ class VectorTools
     template <int dim>
     static void project_boundary_values (const Mapping<dim>       &mapping,
                                         const DoFHandler<dim>    &dof,
-                                        const FMap<dim>::FunctionMap &boundary_functions,
+                                        const typename FunctionMap<dim>::type &boundary_functions,
                                         const Quadrature<dim-1>  &q,
                                         std::map<unsigned int,double> &boundary_values);
     
@@ -554,7 +538,7 @@ class VectorTools
                                      */
     template <int dim>
     static void project_boundary_values (const DoFHandler<dim>    &dof,
-                                        const FMap<dim>::FunctionMap &boundary_function,
+                                        const typename FunctionMap<dim>::type &boundary_function,
                                         const Quadrature<dim-1>  &q,
                                         std::map<unsigned int,double> &boundary_values);
     
index 5843d39490f8ca789c69a2fb96f244ade81b32b1..c8034688159e681cb6ef1cea01491cd1afe63a82 100644 (file)
@@ -54,7 +54,7 @@ template <>
 KellyErrorEstimator<1>::Data::Data(const Mapping<1>                    &,
                                   const DoFHandler<1>                 &,
                                   const Quadrature<0>                 &,
-                                  const FunctionMap                   &,
+                                  const FunctionMap<1>::type          &,
                                   const std::vector<const Vector<double>*> &,
                                   const std::vector<bool>                  &,
                                   const Function<1>                   *,
@@ -63,7 +63,7 @@ KellyErrorEstimator<1>::Data::Data(const Mapping<1>                    &,
                mapping(* static_cast <const Mapping<1> *> (0)),
                dof_handler(* static_cast <const DoFHandler<1> *> (0)),
                quadrature(* static_cast <const Quadrature<0> *> (0)),
-               neumann_bc(* static_cast <const FunctionMap *> (0)),
+               neumann_bc(* static_cast <const FunctionMap<1>::type *> (0)),
                solutions(* static_cast <const std::vector<const Vector<double>*> *> (0)),
                face_integrals (* static_cast<FaceIntegrals*> (0))
 {
@@ -76,7 +76,7 @@ template <int dim>
 KellyErrorEstimator<dim>::Data::Data(const Mapping<dim>                  &mapping,
                                     const DoFHandler<dim>               &dof_handler,
                                     const Quadrature<dim-1>             &quadrature,
-                                    const FunctionMap                   &neumann_bc,
+                                    const typename FunctionMap<dim>::type &neumann_bc,
                                     const std::vector<const Vector<double>*> &solutions,
                                     const std::vector<bool>                  &component_mask,
                                     const Function<dim>                 *coefficients,
@@ -107,7 +107,7 @@ KellyErrorEstimator<dim>::Data::Data(const Mapping<dim>                  &mappin
   Assert (neumann_bc.find(255) == neumann_bc.end(),
          ExcInvalidBoundaryIndicator());
   
-  for (typename FunctionMap::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i)
+  for (typename FunctionMap<dim>::type::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i)
     Assert (i->second->n_components == n_components, ExcInvalidBoundaryFunction());  
   
                                   // Init the size of a lot of vectors
@@ -152,7 +152,7 @@ template <int dim>
 void KellyErrorEstimator<dim>::estimate (const Mapping<dim>      &mapping,
                                         const DoFHandler<dim>   &dof_handler,
                                         const Quadrature<dim-1> &quadrature,
-                                        const FunctionMap       &neumann_bc,
+                                        const typename FunctionMap<dim>::type &neumann_bc,
                                         const Vector<double>    &solution,
                                         Vector<float>           &error,
                                         const std::vector<bool> &component_mask,
@@ -170,7 +170,7 @@ void KellyErrorEstimator<dim>::estimate (const Mapping<dim>      &mapping,
 template <int dim>
 void KellyErrorEstimator<dim>::estimate (const DoFHandler<dim>   &dof_handler,
                                         const Quadrature<dim-1> &quadrature,
-                                        const FunctionMap       &neumann_bc,
+                                        const typename FunctionMap<dim>::type &neumann_bc,
                                         const Vector<double>    &solution,
                                         Vector<float>           &error,
                                         const std::vector<bool> &component_mask,
@@ -200,7 +200,7 @@ template <>
 void KellyErrorEstimator<1>::estimate (const Mapping<1>                    &mapping,
                                       const DoFHandler<1>                 &dof_handler,
                                       const Quadrature<0>                 &,
-                                      const FunctionMap                   &neumann_bc,
+                                      const FunctionMap<1>::type          &neumann_bc,
                                       const std::vector<const Vector<double>*> &solutions,
                                       std::vector<Vector<float>*>              &errors,
                                       const std::vector<bool>                  &component_mask_,
@@ -232,7 +232,7 @@ void KellyErrorEstimator<1>::estimate (const Mapping<1>                    &mapp
          (coefficient->n_components == 1),
          ExcInvalidCoefficient());
 
-  for (FunctionMap::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i)
+  for (FunctionMap<1>::type::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i)
     Assert (i->second->n_components == n_components, ExcInvalidBoundaryFunction());
 
 
@@ -538,7 +538,7 @@ template <int dim>
 void KellyErrorEstimator<dim>::estimate (const Mapping<dim>                  &mapping,
                                         const DoFHandler<dim>               &dof_handler,
                                         const Quadrature<dim-1>             &quadrature,
-                                        const FunctionMap                   &neumann_bc,
+                                        const typename FunctionMap<dim>::type &neumann_bc,
                                         const std::vector<const Vector<double>*> &solutions,
                                         std::vector<Vector<float>*>              &errors,
                                         const std::vector<bool>                  &component_mask,
@@ -672,7 +672,7 @@ void KellyErrorEstimator<dim>::estimate (const Mapping<dim>                  &ma
 template <int dim>
 void KellyErrorEstimator<dim>::estimate (const DoFHandler<dim>               &dof_handler,
                                         const Quadrature<dim-1>             &quadrature,
-                                        const FunctionMap                   &neumann_bc,
+                                        const typename FunctionMap<dim>::type &neumann_bc,
                                         const std::vector<const Vector<double>*> &solutions,
                                         std::vector<Vector<float>*>              &errors,
                                         const std::vector<bool>                  &component_mask,
index 88334a0133857b42982d76ef2092eb62a25c090e..a6b2faf45c3a6e59a2d3aab2e87b48fc72d380c7 100644 (file)
@@ -314,7 +314,7 @@ template <>
 void MatrixCreator<1>::create_boundary_mass_matrix (const DoFHandler<1>       &,
                                                    const Quadrature<0>       &,
                                                    SparseMatrix<double>      &,
-                                                   const FunctionMap         &,
+                                                   const FunctionMap<1>::type&,
                                                    Vector<double>            &,
                                                    std::vector<unsigned int> &,
                                                    const Function<1>         *)
@@ -328,7 +328,7 @@ void MatrixCreator<1>::create_boundary_mass_matrix (const Mapping<1>          &,
                                                    const DoFHandler<1>       &,
                                                    const Quadrature<0>       &,
                                                    SparseMatrix<double>      &,
-                                                   const FunctionMap         &,
+                                                   const FunctionMap<1>::type&,
                                                    Vector<double>            &,
                                                    std::vector<unsigned int> &,
                                                    const Function<1>         *)
@@ -347,7 +347,7 @@ MatrixCreator<dim>::create_boundary_mass_matrix (const Mapping<dim>        &mapp
                                                 const DoFHandler<dim>     &dof,
                                                 const Quadrature<dim-1>   &q,
                                                 SparseMatrix<double>      &matrix,
-                                                const FunctionMap         &boundary_functions,
+                                                const typename FunctionMap<dim>::type         &boundary_functions,
                                                 Vector<double>            &rhs_vector,
                                                 std::vector<unsigned int> &dof_to_boundary_mapping,
                                                 const Function<dim>       *a)
@@ -387,7 +387,7 @@ create_boundary_mass_matrix_1 (const Mapping<1>          &,
                               const DoFHandler<1>       &,
                               const Quadrature<0>       &,
                               SparseMatrix<double>      &,
-                              const FunctionMap         &,
+                              const FunctionMap<1>::type&,
                               Vector<double>            &,
                               std::vector<unsigned int> &,
                               const Function<1> * const ,
@@ -407,7 +407,7 @@ create_boundary_mass_matrix_1 (const Mapping<dim>        &mapping,
                               const DoFHandler<dim>     &dof,
                               const Quadrature<dim-1>   &q,
                               SparseMatrix<double>      &matrix,
-                              const FunctionMap         &boundary_functions,
+                              const typename FunctionMap<dim>::type &boundary_functions,
                               Vector<double>            &rhs_vector,
                               std::vector<unsigned int> &dof_to_boundary_mapping,
                               const Function<dim> * const a,
@@ -694,7 +694,7 @@ template <int dim>
 void MatrixCreator<dim>::create_boundary_mass_matrix (const DoFHandler<dim>     &dof,
                                                      const Quadrature<dim-1>   &q,
                                                      SparseMatrix<double>      &matrix,
-                                                     const FunctionMap         &rhs,
+                                                     const typename FunctionMap<dim>::type &rhs,
                                                      Vector<double>            &rhs_vector,
                                                      std::vector<unsigned int> &dof_to_boundary_mapping,
                                                      const Function<dim>       *a)
index 984617fb7aefc27895fd636c0bc3405b112747dd..6a2efed94923bbc5321efe96b775693317872b54 100644 (file)
@@ -383,7 +383,7 @@ void VectorTools::project (const Mapping<dim>       &mapping,
                                         // the different boundary parts. We want the
                                         // @p{function} to hold on all parts of the
                                         // boundary
-       FMap<dim>::FunctionMap boundary_functions;
+       typename FunctionMap<dim>::type boundary_functions;
        for (unsigned char c=0; c<255; ++c)
          boundary_functions[c] = &function;
        project_boundary_values (dof, boundary_functions, q_boundary,
@@ -750,7 +750,7 @@ template <int dim>
 void
 VectorTools::project_boundary_values (const Mapping<dim>       &mapping,
                                      const DoFHandler<dim>    &dof,
-                                     const FMap<dim>::FunctionMap &boundary_functions,
+                                     const typename FunctionMap<dim>::type &boundary_functions,
                                      const Quadrature<dim-1>  &q,
                                      std::map<unsigned int,double> &boundary_values)
 {
@@ -765,7 +765,7 @@ VectorTools::project_boundary_values (const Mapping<dim>       &mapping,
   
   std::vector<unsigned int> dof_to_boundary_mapping;
   std::set<unsigned char> selected_boundary_components;
-  for (typename FMap<dim>::FunctionMap::const_iterator i=boundary_functions.begin();
+  for (typename FunctionMap<dim>::type::const_iterator i=boundary_functions.begin();
        i!=boundary_functions.end(); ++i)
     selected_boundary_components.insert (i->first);
   
@@ -842,7 +842,7 @@ VectorTools::project_boundary_values (const Mapping<dim>       &mapping,
 template <int dim>
 void
 VectorTools::project_boundary_values (const DoFHandler<dim>    &dof,
-                                     const FMap<dim>::FunctionMap &boundary_functions,
+                                     const typename FunctionMap<dim>::type &boundary_functions,
                                      const Quadrature<dim-1>  &q,
                                      std::map<unsigned int,double> &boundary_values)
 {
@@ -1312,12 +1312,12 @@ void VectorTools::integrate_difference (const DoFHandler<deal_II_dimension> &,
 template
 void VectorTools::project_boundary_values (const Mapping<deal_II_dimension>     &,
                                           const DoFHandler<deal_II_dimension>  &,
-                                          const FMap<deal_II_dimension>::FunctionMap &,
+                                          const FunctionMap<deal_II_dimension>::FunctionMap &,
                                           const Quadrature<deal_II_dimension-1>&,
                                           std::map<unsigned int,double>        &);
 template
 void VectorTools::project_boundary_values (const DoFHandler<deal_II_dimension>  &,
-                                          const FMap<deal_II_dimension>::FunctionMap &,
+                                          const FunctionMap<deal_II_dimension>::FunctionMap &,
                                           const Quadrature<deal_II_dimension-1>&,
                                           std::map<unsigned int,double>        &);
 template
index af016cd40c66bb61b7c20245d2a36dfeb6d63ed9..708a0360b5367308f63697cdaed44a9230cd785e 100644 (file)
@@ -326,7 +326,9 @@ documentation, etc</a>.
        class="class">KellyErrorEstimator</code>). It is now unified in
        one place and is called <code
        class="class">FunctionMap<dim>::type</code> (it is a local
-       typedef in a class called <code class="class">FunctionMap</code>).
+       typedef in a class called <code
+       class="class">FunctionMap</code>). This type is defined in the
+       file <tt>dofs/function_map.h</tt>.
        <br>
        (WB 2001/04/09)
        </p>
index 3682e235205e74983db3cbd9d99d07b7bdf70e97..163abefa1c44a842eafd07b29d6b679ad0560f1e 100644 (file)
@@ -681,7 +681,7 @@ void LaplaceProblem<dim>::refine_grid ()
                                   // do not use Neumann boundary
                                   // conditions, the map will not
                                   // contain entries.
-  KellyErrorEstimator<dim>::FunctionMap neumann_boundary;
+  FunctionMap<dim>::type neumann_boundary;
 
                                   // Now we call the error
                                   // estimator. The parameters should
index a16c466f995f98f7e553706964d4d6dc03ff1822..3389fefbd125827068b70dceecb3ab8dedfaedae 100644 (file)
@@ -1080,7 +1080,7 @@ void LaplaceProblem<dim>::refine_grid ()
       {
        Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
 
-       KellyErrorEstimator<dim>::FunctionMap neumann_boundary;
+       FunctionMap<dim>::type neumann_boundary;
        KellyErrorEstimator<dim>::estimate (dof_handler,
                                            QGauss3<dim-1>(),
                                            neumann_boundary,
index c7be77c74b5f63d95fcbcbfa1acc683cd8128c7e..c767e4d2e21ac5a116536b2d955f89d645b82d41 100644 (file)
@@ -791,7 +791,7 @@ void ElasticProblem<dim>::refine_grid ()
 {
   Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
 
-  KellyErrorEstimator<dim>::FunctionMap neumann_boundary;
+  FunctionMap<dim>::type neumann_boundary;
   KellyErrorEstimator<dim>::estimate (dof_handler,
                                      QGauss2<dim-1>(),
                                      neumann_boundary,
index 25908a4a046f790d9a3fd8e4551f2f47cab04c5b..0a95248026709bf736ef12cb48be0fd3d1fc4852 100644 (file)
@@ -556,7 +556,7 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
 
       QSimpson<dim-1> eq;
       KellyErrorEstimator<dim>::estimate (*dof, eq,
-                                         KellyErrorEstimator<dim>::FunctionMap(),
+                                         FunctionMap<dim>::type(),
                                          solution,
                                          estimated_error_per_cell,
                                          vector<bool>(), // all components
index 477465cab8e21172d462cd34518913dc5d5a72cb..e28b5841d29b0d4d03acb8ff5b4b34c69f44ba2c 100644 (file)
@@ -398,7 +398,7 @@ void LaplaceProblem<dim>::refine_grid ()
 {
   Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
 
-  KellyErrorEstimator<dim>::FunctionMap neumann_boundary;
+  FunctionMap<dim>::type neumann_boundary;
   KellyErrorEstimator<dim>::estimate (mg_dof_handler,
                                      QGauss3<dim-1>(),
                                      neumann_boundary,
index 555437624b196b0a15f453f5bad0d57b0731b4c7..c599249d46106fdd50d261fbf4b0a14248b08b21 100644 (file)
@@ -172,7 +172,7 @@ void NonlinearProblem<dim>::run () {
   PoissonEquation<dim>            equation (rhs, last_solution);
   QGauss2<dim>                    quadrature;
   
-  ProblemBase<dim>::FunctionMap dirichlet_bc;
+  FunctionMap<dim>::type dirichlet_bc;
   dirichlet_bc[0] = &boundary_values;
 
 
@@ -232,7 +232,7 @@ void NonlinearProblem<dim>::run () {
       KellyErrorEstimator<dim> ee;
       QSimpson<dim-1> eq;
       ee.estimate (*dof, eq,
-                  KellyErrorEstimator<dim>::FunctionMap(),
+                  FunctionMap<dim>::type(),
                   solution,
                   error_indicator);
       GridRefinement::refine_and_coarsen_fixed_number (*tria, error_indicator, 0.3, 0);
index 82d4292cdeb5991c2bdcc53199f8a564df50fea5..abd02cac48db213de271dc092e9428bb6594e19e 100644 (file)
@@ -61,7 +61,7 @@ check_boundary (const DoFHandler<dim> &dof,
                const Mapping<dim>    &mapping)
 {
   MySquareFunction<dim> coefficient;
-  typename MatrixTools<dim>::FunctionMap function_map;
+  typename FunctionMap<dim>::type function_map;
   function_map[0] = &coefficient;
 
   QGauss6<dim-1> face_quadrature;
@@ -159,7 +159,7 @@ check ()
 
   ExpFunction<dim> coefficient;
   
-  typename MatrixTools<dim>::FunctionMap function_map;
+  typename FunctionMap<dim>::type function_map;
   function_map[0] = &coefficient;
 
   for (unsigned int test=0; test<2; ++test)
@@ -208,10 +208,10 @@ int main ()
   deallog.depth_console (0);
 
   deallog.push ("1d");
-  check<1> ();
+//  check<1> ();
   deallog.pop ();
   deallog.push ("2d");
-  check<2> ();
+//  check<2> ();
   deallog.pop ();
   deallog.push ("3d");
   check<3> ();
index 2c8c43eb0e2015bd8ca3934ded76abaedbf7a650..864a11111624fae96abd466f2bec1ec8a45bf945 100644 (file)
@@ -5889,7 +5889,7 @@ template <int dim>
 void TimeStep_ErrorEstimation<dim>::estimate_error_energy (const unsigned int which_variables) {
   Assert (which_variables<=1, ExcInternalError());
   
-  KellyErrorEstimator<dim>::FunctionMap neumann_boundary;
+  typename FunctionMap<dim>::type neumann_boundary;
   static ZeroFunction<dim> homogeneous_neumann_bc;
   neumann_boundary[1] = &homogeneous_neumann_bc;
 

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.