]> https://gitweb.dealii.org/ - dealii.git/commitdiff
continue templating VectorTools; introduce templates to MatrixTools and DoFTools
authorDenis Davydov <davydden@gmail.com>
Tue, 23 Feb 2016 15:31:12 +0000 (16:31 +0100)
committerDenis Davydov <davydden@gmail.com>
Sat, 27 Feb 2016 01:35:23 +0000 (02:35 +0100)
(i) drop the typedef FunctionMap from (hp::)DoFHandler and template n_boundary_dofs().
 Fix a few places where it was used.
(ii) template make_boundary_sparsity_pattern(...,FunctionMap,...)
(iii) new templates in MatrixCreator::
  create_mass_matrix(), create_boundary_mass_matrix(),
  apply_boundary_values() and local_apply_boundary_values().
(iv) number templates in VectorTools::
  interpolate_boundary_values(), project_boundary_values(),
(v) instantiate ConstraintMatrix::distribute_local_to_global for SparseMatrix<long double>

18 files changed:
include/deal.II/dofs/dof_handler.h
include/deal.II/dofs/dof_tools.h
include/deal.II/hp/dof_handler.h
include/deal.II/numerics/matrix_tools.h
include/deal.II/numerics/vector_tools.h
include/deal.II/numerics/vector_tools.templates.h
source/dofs/dof_handler.cc
source/dofs/dof_handler.inst.in
source/dofs/dof_tools_sparsity.cc
source/dofs/dof_tools_sparsity.inst.in
source/hp/dof_handler.cc
source/hp/dof_handler.inst.in
source/lac/constraint_matrix.cc
source/lac/constraint_matrix.inst.in
source/numerics/matrix_tools.cc
source/numerics/matrix_tools.inst.in
source/numerics/vector_tools_boundary.inst.in
source/numerics/vector_tools_project.inst.in

index 727372449b51f59f9e33566470a478d77f0b7166..1e98e5cb14373370bf797065fe10ea2635b50ce0 100644 (file)
@@ -258,11 +258,6 @@ public:
   typedef typename LevelSelector::face_iterator         level_face_iterator;
 
 
-  /**
-   * Alias the @p FunctionMap type declared elsewhere.
-   */
-  typedef typename dealii::FunctionMap<spacedim>::type FunctionMap;
-
   /**
    * Make the dimension available in function templates.
    */
@@ -706,9 +701,12 @@ public:
    * reason that a @p map rather than a @p set is used is the same as
    * described in the section on the @p make_boundary_sparsity_pattern
    * function.
+   *
+   * The type of boundary_ids equals typename FunctionMap<spacedim,number>::type .
    */
+  template<typename number>
   types::global_dof_index
-  n_boundary_dofs (const FunctionMap &boundary_ids) const;
+  n_boundary_dofs (const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_ids) const;
 
   /**
    * Same function, but with different data type of the argument, which is
@@ -1098,7 +1096,6 @@ private:
 #ifndef DOXYGEN
 
 template <> types::global_dof_index DoFHandler<1>::n_boundary_dofs () const;
-template <> types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &) const;
 template <> types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id> &) const;
 
 template <> void DoFHandler<1>::renumber_dofs(unsigned int,const std::vector<types::global_dof_index>  &new_numbers);
index b1eef9f9e140f8eac80dd68be32fe67fac6c6088..4a9253d003114fee225e5d7fe4f029ee23733972 100644 (file)
@@ -681,17 +681,17 @@ namespace DoFTools
    * This function could have been written by passing a @p set of boundary_id
    * numbers. However, most of the functions throughout deal.II dealing with
    * boundary indicators take a mapping of boundary indicators and the
-   * corresponding boundary function, i.e., a FunctionMap argument.
+   * corresponding boundary function, i.e., a std::map<types::boundary_id, const Function<spacedim,number>*> argument.
    * Correspondingly, this function does the same, though the actual boundary
    * function is ignored here. (Consequently, if you don't have any such
    * boundary functions, just create a map with the boundary indicators you
    * want and set the function pointers to null pointers).
    */
-  template <typename DoFHandlerType, typename SparsityPatternType>
+  template <typename DoFHandlerType, typename SparsityPatternType, typename number>
   void
   make_boundary_sparsity_pattern
   (const DoFHandlerType                                              &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type &boundary_ids,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &boundary_ids,
    const std::vector<types::global_dof_index>                        &dof_to_boundary_mapping,
    SparsityPatternType                                               &sparsity);
 
index dd2e24e14ffbd7cd3ee3ba199f158715f786cd92..0577b0f170f25d979fd8caa201fb1ca7aeea1183 100644 (file)
@@ -202,11 +202,6 @@ namespace hp
 
     typedef typename LevelSelector::face_iterator         level_face_iterator;
 
-    /**
-     * Alias the @p FunctionMap type declared elsewhere.
-     */
-    typedef typename FunctionMap<spacedim>::type FunctionMap;
-
     /**
      * Make the dimension available in function templates.
      */
@@ -526,9 +521,12 @@ namespace hp
      * reason that a @p map rather than a @p set is used is the same as
      * described in the section on the @p make_boundary_sparsity_pattern
      * function.
+     *
+     * The type of @p boundary_ids equals typename FunctionMap<spacedim,number>::type.
      */
+    template <typename number>
     types::global_dof_index
-    n_boundary_dofs (const FunctionMap &boundary_ids) const;
+    n_boundary_dofs (const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_ids) const;
 
     /**
      * Same function, but with different data type of the argument, which is
index 4784417ad8791d08d437e0fd5b3e4fce99ce9add..9c6b0ea26d03418b0b9e30dca30705451786f6b5 100644 (file)
@@ -53,6 +53,8 @@ namespace hp
 
 
 #ifdef DEAL_II_WITH_PETSC
+#  include <petscvec.h>
+
 namespace PETScWrappers
 {
   class SparseMatrix;
@@ -68,6 +70,9 @@ namespace PETScWrappers
 #endif
 
 #ifdef DEAL_II_WITH_TRILINOS
+// TODO: move this to a stand-alone header and include from there?
+#  define TrilinosScalar double
+
 namespace TrilinosWrappers
 {
   class SparseMatrix;
@@ -175,8 +180,8 @@ namespace TrilinosWrappers
  *
  * The 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 FunctionMap passed to the function
- * (i.e. if you want to set up the mass matrix for the parts of the boundary
+ * parts with indicators contained in a std::map<types::boundary_id, const Function<spacedim,number>*>
+ *  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 <tt>unsigned
  * char</tt>s as parameter @p boundary_functions containing the keys zero and
  * 2). The size of the matrix is equal to the number of degrees of freedom
@@ -232,23 +237,23 @@ namespace MatrixCreator
    *
    * See the general documentation of this namespace for more information.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const Mapping<dim, spacedim>       &mapping,
                            const DoFHandler<dim,spacedim>    &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
   /**
    * Calls the create_mass_matrix() function, see above, with
    * <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const DoFHandler<dim,spacedim>    &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
   /**
@@ -267,73 +272,73 @@ namespace MatrixCreator
    *
    * See the general documentation of this namespace for more information.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const Mapping<dim, spacedim>   &mapping,
                            const DoFHandler<dim,spacedim> &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> &rhs,
+                           const Function<spacedim,number> &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
   /**
    * Calls the create_mass_matrix() function, see above, with
    * <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const DoFHandler<dim,spacedim> &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> &rhs,
+                           const Function<spacedim,number> &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
   /**
    * Same function as above, but for hp objects.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::MappingCollection<dim,spacedim>       &mapping,
                            const hp::DoFHandler<dim,spacedim>    &dof,
                            const hp::QCollection<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
   /**
    * Same function as above, but for hp objects.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::DoFHandler<dim,spacedim>    &dof,
                            const hp::QCollection<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
   /**
    * Same function as above, but for hp objects.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::MappingCollection<dim,spacedim> &mapping,
                            const hp::DoFHandler<dim,spacedim> &dof,
                            const hp::QCollection<dim> &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> &rhs,
+                           const Function<spacedim,number> &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
   /**
    * Same function as above, but for hp objects.
    */
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::DoFHandler<dim,spacedim> &dof,
                            const hp::QCollection<dim> &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> &rhs,
+                           const Function<spacedim,number> &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const a = 0,
+                           const Function<spacedim,number> *const a = 0,
                            const ConstraintMatrix   &constraints = ConstraintMatrix());
 
 
@@ -359,15 +364,15 @@ namespace MatrixCreator
    * @todo This function does not work for finite elements with cell-dependent
    * shape functions.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_boundary_mass_matrix (const Mapping<dim, spacedim>       &mapping,
                                     const DoFHandler<dim,spacedim>    &dof,
                                     const Quadrature<dim-1>  &q,
-                                    SparseMatrix<double>     &matrix,
-                                    const typename FunctionMap<spacedim>::type &boundary_functions,
-                                    Vector<double>           &rhs_vector,
+                                    SparseMatrix<number>     &matrix,
+                                    const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                                    Vector<number>           &rhs_vector,
                                     std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                                    const Function<spacedim> *const weight = 0,
+                                    const Function<spacedim,number> *const weight = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
 
@@ -375,41 +380,41 @@ namespace MatrixCreator
    * Calls the create_boundary_mass_matrix() function, see above, with
    * <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_boundary_mass_matrix (const DoFHandler<dim,spacedim>    &dof,
                                     const Quadrature<dim-1>  &q,
-                                    SparseMatrix<double>     &matrix,
-                                    const typename FunctionMap<spacedim>::type        &boundary_functions,
-                                    Vector<double>           &rhs_vector,
+                                    SparseMatrix<number>     &matrix,
+                                    const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                                    Vector<number>           &rhs_vector,
                                     std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                                    const Function<spacedim> *const a = 0,
+                                    const Function<spacedim,number> *const a = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
    * Same function as above, but for hp objects.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_boundary_mass_matrix (const hp::MappingCollection<dim,spacedim>       &mapping,
                                     const hp::DoFHandler<dim,spacedim>    &dof,
                                     const hp::QCollection<dim-1>  &q,
-                                    SparseMatrix<double>     &matrix,
-                                    const typename FunctionMap<spacedim>::type &boundary_functions,
-                                    Vector<double>           &rhs_vector,
+                                    SparseMatrix<number>     &matrix,
+                                    const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                                    Vector<number>           &rhs_vector,
                                     std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                                    const Function<spacedim> *const a = 0,
+                                    const Function<spacedim,number> *const a = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
    * Same function as above, but for hp objects.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_boundary_mass_matrix (const hp::DoFHandler<dim,spacedim>    &dof,
                                     const hp::QCollection<dim-1>  &q,
-                                    SparseMatrix<double>     &matrix,
-                                    const typename FunctionMap<spacedim>::type        &boundary_functions,
-                                    Vector<double>           &rhs_vector,
+                                    SparseMatrix<number>     &matrix,
+                                    const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                                    Vector<number>           &rhs_vector,
                                     std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                                    const Function<spacedim> *const a = 0,
+                                    const Function<spacedim,number> *const a = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
@@ -757,7 +762,7 @@ namespace MatrixTools
    */
   template <typename number>
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,number> &boundary_values,
                          SparseMatrix<number>  &matrix,
                          Vector<number>        &solution,
                          Vector<number>        &right_hand_side,
@@ -770,7 +775,7 @@ namespace MatrixTools
    */
   template <typename number>
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,number> &boundary_values,
                          BlockSparseMatrix<number>           &matrix,
                          BlockVector<number>                 &solution,
                          BlockVector<number>                 &right_hand_side,
@@ -797,7 +802,7 @@ namespace MatrixTools
    * This function is used in step-17 and step-18.
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,PetscScalar> &boundary_values,
                          PETScWrappers::SparseMatrix  &matrix,
                          PETScWrappers::Vector  &solution,
                          PETScWrappers::Vector  &right_hand_side,
@@ -823,7 +828,7 @@ namespace MatrixTools
    * rows.
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,PetscScalar> &boundary_values,
                          PETScWrappers::MPI::SparseMatrix  &matrix,
                          PETScWrappers::MPI::Vector  &solution,
                          PETScWrappers::MPI::Vector  &right_hand_side,
@@ -833,7 +838,7 @@ namespace MatrixTools
    * Same function, but for parallel PETSc matrices and a non-parallel vector.
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,PetscScalar> &boundary_values,
                          PETScWrappers::MPI::SparseMatrix  &matrix,
                          PETScWrappers::Vector       &solution,
                          PETScWrappers::MPI::Vector  &right_hand_side,
@@ -843,7 +848,7 @@ namespace MatrixTools
    * Same as above but for BlockSparseMatrix.
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,PetscScalar>  &boundary_values,
                          PETScWrappers::MPI::BlockSparseMatrix &matrix,
                          PETScWrappers::MPI::BlockVector        &solution,
                          PETScWrappers::MPI::BlockVector        &right_hand_side,
@@ -870,7 +875,7 @@ namespace MatrixTools
    * name in this namespace.)
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                          TrilinosWrappers::SparseMatrix  &matrix,
                          TrilinosWrappers::Vector        &solution,
                          TrilinosWrappers::Vector        &right_hand_side,
@@ -881,7 +886,7 @@ namespace MatrixTools
    * structures.
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix  &matrix,
                          TrilinosWrappers::BlockVector        &solution,
                          TrilinosWrappers::BlockVector        &right_hand_side,
@@ -907,7 +912,7 @@ namespace MatrixTools
    * rows.
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                          TrilinosWrappers::SparseMatrix  &matrix,
                          TrilinosWrappers::MPI::Vector   &solution,
                          TrilinosWrappers::MPI::Vector   &right_hand_side,
@@ -918,7 +923,7 @@ namespace MatrixTools
    * structures.
    */
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix  &matrix,
                          TrilinosWrappers::MPI::BlockVector   &solution,
                          TrilinosWrappers::MPI::BlockVector   &right_hand_side,
@@ -943,11 +948,12 @@ namespace MatrixTools
    *
    * @dealiiVideoLecture{21.6,21.65}
    */
+  template <typename number>
   void
-  local_apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  local_apply_boundary_values (const std::map<types::global_dof_index,number> &boundary_values,
                                const std::vector<types::global_dof_index> &local_dof_indices,
-                               FullMatrix<double> &local_matrix,
-                               Vector<double>     &local_rhs,
+                               FullMatrix<number> &local_matrix,
+                               Vector<number>     &local_rhs,
                                const bool          eliminate_columns);
 
   /**
index 64f046f0c4486f7a6eab79369893b6bea590196b..3203daec378b744ca3dbc8566a6ca00eb553d692 100644 (file)
@@ -32,7 +32,6 @@
 DEAL_II_NAMESPACE_OPEN
 
 template <int dim, typename Number> class Function;
-template <int dim, typename Number> struct FunctionMap;
 template <int dim> class Quadrature;
 template <int dim> class QGauss;
 
@@ -111,7 +110,8 @@ class ConstraintMatrix;
  * MatrixTools::apply_boundary_values() function. The projection of the trace
  * of the function to the boundary is done with the
  * VectorTools::project_boundary_values() (see below) function, which is
- * called with a map of boundary functions FunctionMap in which all boundary
+ * called with a map of boundary functions
+ * std::map<types::boundary_id, const Function<spacedim,number>*> in which all boundary
  * indicators from zero to numbers::internal_face_boundary_id-1
  * (numbers::internal_face_boundary_id is used for other purposes, see the
  * Triangulation class documentation) point to the function to be projected.
@@ -217,7 +217,8 @@ class ConstraintMatrix;
  * trace of the function to the boundary.
  *
  * The projection takes place on all boundary parts with boundary indicators
- * listed in the map (FunctioMap::FunctionMap) of boundary functions. These
+ * listed in the map (std::map<types::boundary_id, const Function<spacedim,number>*>)
+ * of boundary functions. These
  * boundary parts may or may not be continuous. For these boundary parts, the
  * mass matrix is assembled using the
  * MatrixTools::create_boundary_mass_matrix() function, as well as the
@@ -698,26 +699,26 @@ namespace VectorTools
    *
    * See the general documentation of this namespace for more information.
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
    const DoFHandlerType                                                     &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type        &function_map,
-   std::map<types::global_dof_index,double>                                 &boundary_values,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+   std::map<types::global_dof_index,number>                                 &boundary_values,
    const ComponentMask                                                      &component_mask = ComponentMask());
 
   /**
    * Like the previous function, but take a mapping collection to go with the
    * hp::DoFHandler object.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values
   (const hp::MappingCollection<dim,spacedim>  &mapping,
    const hp::DoFHandler<dim,spacedim>         &dof,
-   const typename FunctionMap<spacedim>::type &function_map,
-   std::map<types::global_dof_index,double>   &boundary_values,
+   const std::map<types::boundary_id, const Function<spacedim,number>*> &function_map,
+   std::map<types::global_dof_index,number>   &boundary_values,
    const ComponentMask                        &component_mask = ComponentMask());
 
   /**
@@ -729,14 +730,14 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
    const DoFHandlerType                                                     &dof,
    const types::boundary_id                                                  boundary_component,
-   const Function<DoFHandlerType::space_dimension,double>                   &boundary_function,
-   std::map<types::global_dof_index,double>                                 &boundary_values,
+   const Function<DoFHandlerType::space_dimension,number>                   &boundary_function,
+   std::map<types::global_dof_index,number>                                 &boundary_values,
    const ComponentMask                                                      &component_mask = ComponentMask());
 
   /**
@@ -748,13 +749,13 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const DoFHandlerType                                   &dof,
    const types::boundary_id                                boundary_component,
-   const Function<DoFHandlerType::space_dimension,double> &boundary_function,
-   std::map<types::global_dof_index,double>               &boundary_values,
+   const Function<DoFHandlerType::space_dimension,number> &boundary_function,
+   std::map<types::global_dof_index,number>               &boundary_values,
    const ComponentMask                                    &component_mask = ComponentMask());
 
 
@@ -764,12 +765,12 @@ namespace VectorTools
    * apply as for the previous function, in particular about the use of the
    * component mask and the requires size of the function object.
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const DoFHandlerType                                              &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
-   std::map<types::global_dof_index,double>                          &boundary_values,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+   std::map<types::global_dof_index,number>                          &boundary_values,
    const ComponentMask                                               &component_mask = ComponentMask());
 
 
@@ -834,14 +835,14 @@ namespace VectorTools
    *
    * @ingroup constraints
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
-  (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
-   const DoFHandlerType                                                     &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type        &function_map,
-   ConstraintMatrix                                                         &constraints,
-   const ComponentMask                                                      &component_mask = ComponentMask());
+  (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension>                    &mapping,
+   const DoFHandlerType                                                                        &dof,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+   ConstraintMatrix                                                                            &constraints,
+   const ComponentMask                                                                         &component_mask = ComponentMask());
 
   /**
    * Same function as above, but taking only one pair of boundary indicator
@@ -854,13 +855,13 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
    const DoFHandlerType                                                     &dof,
    const types::boundary_id                                                  boundary_component,
-   const Function<DoFHandlerType::space_dimension,double>                   &boundary_function,
+   const Function<DoFHandlerType::space_dimension,number>                   &boundary_function,
    ConstraintMatrix                                                         &constraints,
    const ComponentMask                                                      &component_mask = ComponentMask());
 
@@ -875,12 +876,12 @@ namespace VectorTools
    * @see
    * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const DoFHandlerType                                   &dof,
    const types::boundary_id                                boundary_component,
-   const Function<DoFHandlerType::space_dimension,double> &boundary_function,
+   const Function<DoFHandlerType::space_dimension,number> &boundary_function,
    ConstraintMatrix                                       &constraints,
    const ComponentMask                                    &component_mask = ComponentMask());
 
@@ -893,11 +894,11 @@ namespace VectorTools
    *
    * @ingroup constraints
    */
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const DoFHandlerType                                              &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
    ConstraintMatrix                                                  &constraints,
    const ComponentMask                                               &component_mask = ComponentMask());
 
@@ -952,45 +953,45 @@ namespace VectorTools
    * component number in @p boundary_functions that should be used for this
    * component in @p dof. By default, no remapping is applied.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void project_boundary_values (const Mapping<dim, spacedim>       &mapping,
                                 const DoFHandler<dim,spacedim>    &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_functions,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
                                 const Quadrature<dim-1>  &q,
-                                std::map<types::global_dof_index,double> &boundary_values,
+                                std::map<types::global_dof_index,number> &boundary_values,
                                 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
    * Calls the project_boundary_values() function, see above, with
    * <tt>mapping=MappingQGeneric@<dim,spacedim@>(1)</tt>.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void project_boundary_values (const DoFHandler<dim,spacedim>    &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_function,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_function,
                                 const Quadrature<dim-1>  &q,
-                                std::map<types::global_dof_index,double> &boundary_values,
+                                std::map<types::global_dof_index,number> &boundary_values,
                                 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
    * Same as above, but for objects of type hp::DoFHandler
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void project_boundary_values (const hp::MappingCollection<dim, spacedim>       &mapping,
                                 const hp::DoFHandler<dim,spacedim>    &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_functions,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
                                 const hp::QCollection<dim-1>  &q,
-                                std::map<types::global_dof_index,double> &boundary_values,
+                                std::map<types::global_dof_index,number> &boundary_values,
                                 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
    * Calls the project_boundary_values() function, see above, with
    * <tt>mapping=MappingQGeneric@<dim,spacedim@>(1)</tt>.
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void project_boundary_values (const hp::DoFHandler<dim,spacedim>    &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_function,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_function,
                                 const hp::QCollection<dim-1>  &q,
-                                std::map<types::global_dof_index,double> &boundary_values,
+                                std::map<types::global_dof_index,number> &boundary_values,
                                 std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
   /**
@@ -1031,10 +1032,10 @@ namespace VectorTools
    *
    * @ingroup constraints
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void project_boundary_values (const Mapping<dim, spacedim>   &mapping,
                                 const DoFHandler<dim,spacedim> &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_functions,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
                                 const Quadrature<dim-1>        &q,
                                 ConstraintMatrix               &constraints,
                                 std::vector<unsigned int>       component_mapping = std::vector<unsigned int>());
@@ -1045,9 +1046,9 @@ namespace VectorTools
    *
    * @ingroup constraints
    */
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void project_boundary_values (const DoFHandler<dim,spacedim> &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_function,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_function,
                                 const Quadrature<dim-1>        &q,
                                 ConstraintMatrix               &constraints,
                                 std::vector<unsigned int>       component_mapping = std::vector<unsigned int>());
index f2a40b952b7816ca146e45be334d70d63bab0eab..68d9cc19839a9a0b29c1428b8365fa717bb0ed04 100644 (file)
@@ -500,10 +500,10 @@ namespace VectorTools
      * mapping here because the function we evaluate for the DoFs is zero in
      * the mapped locations as well as in the original, unmapped locations
      */
-    template <typename DoFHandlerType>
+    template <typename DoFHandlerType, typename number>
     void
     interpolate_zero_boundary_values (const DoFHandlerType                     &dof_handler,
-                                      std::map<types::global_dof_index,double> &boundary_values)
+                                      std::map<types::global_dof_index,number> &boundary_values)
     {
       const unsigned int dim = DoFHandlerType::dimension;
 
@@ -690,15 +690,16 @@ namespace VectorTools
      * Compute the boundary values to be used in the project() functions.
      */
     template <int dim, int spacedim, template <int, int> class DoFHandlerType,
-              template <int,int> class M_or_MC, template <int> class Q_or_QC>
+              template <int,int> class M_or_MC, template <int> class Q_or_QC,
+              typename number>
     void project_compute_b_v
     (const M_or_MC<dim, spacedim>             &mapping,
      const DoFHandlerType<dim,spacedim>       &dof,
-     const Function<spacedim>                 &function,
+     const Function<spacedim,number>          &function,
      const bool                                enforce_zero_boundary,
      const Q_or_QC<dim-1>                     &q_boundary,
      const bool                                project_to_boundary_first,
-     std::map<types::global_dof_index,double> &boundary_values)
+     std::map<types::global_dof_index,number> &boundary_values)
     {
       if (enforce_zero_boundary == true)
         // no need to project boundary
@@ -722,7 +723,7 @@ namespace VectorTools
             const std::vector<types::boundary_id>
             used_boundary_ids = dof.get_triangulation().get_boundary_ids();
 
-            typename FunctionMap<spacedim>::type boundary_functions;
+            std::map<types::boundary_id, const Function<spacedim,number>*> boundary_functions;
             for (unsigned int i=0; i<used_boundary_ids.size(); ++i)
               boundary_functions[used_boundary_ids[i]] = &function;
             project_boundary_values (mapping, dof, boundary_functions, q_boundary,
@@ -735,11 +736,11 @@ namespace VectorTools
      * Return whether the boundary values try to constrain a degree of freedom
      * that is already constrained to something else
      */
-    inline
+    template <typename number>
     bool constraints_and_b_v_are_compatible (const ConstraintMatrix   &constraints,
-                                             std::map<types::global_dof_index,double> &boundary_values)
+                                             std::map<types::global_dof_index,number> &boundary_values)
     {
-      for (std::map<types::global_dof_index,double>::iterator it=boundary_values.begin();
+      for (typename std::map<types::global_dof_index,number>::iterator it=boundary_values.begin();
            it != boundary_values.end(); ++it)
         if (constraints.is_constrained(it->first))
 //TODO: This looks wrong -- shouldn't it be ==0 in the first condition and && ?
@@ -762,12 +763,13 @@ namespace VectorTools
                      const DoFHandlerType<dim,spacedim> &dof,
                      const ConstraintMatrix             &constraints,
                      const Q_or_QC<dim>                 &quadrature,
-                     const Function<spacedim>           &function,
+                     const Function<spacedim, typename VectorType::value_type>           &function,
                      VectorType                         &vec_result,
                      const bool                          enforce_zero_boundary,
                      const Q_or_QC<dim-1>               &q_boundary,
                      const bool                          project_to_boundary_first)
     {
+      typedef typename VectorType::value_type number;
       Assert (dof.get_fe().n_components() == function.n_components,
               ExcDimensionMismatch(dof.get_fe().n_components(),
                                    function.n_components));
@@ -775,16 +777,16 @@ namespace VectorTools
               ExcDimensionMismatch (vec_result.size(), dof.n_dofs()));
 
       // make up boundary values
-      std::map<types::global_dof_index,double> boundary_values;
+      std::map<types::global_dof_index,number> boundary_values;
       project_compute_b_v(mapping, dof, function, enforce_zero_boundary,
                           q_boundary, project_to_boundary_first, boundary_values);
 
       // check if constraints are compatible (see below)
       const bool constraints_are_compatible =
-        constraints_and_b_v_are_compatible(constraints, boundary_values);
+        constraints_and_b_v_are_compatible<number>(constraints, boundary_values);
 
       // set up mass matrix and right hand side
-      Vector<double> vec (dof.n_dofs());
+      Vector<number> vec (dof.n_dofs());
       SparsityPattern sparsity;
       {
         DynamicSparsityPattern dsp (dof.n_dofs(), dof.n_dofs());
@@ -793,8 +795,8 @@ namespace VectorTools
 
         sparsity.copy_from (dsp);
       }
-      SparseMatrix<double> mass_matrix (sparsity);
-      Vector<double> tmp (mass_matrix.n());
+      SparseMatrix<number> mass_matrix (sparsity);
+      Vector<number> tmp (mass_matrix.n());
 
       // If the constraint matrix does not conflict with the given boundary
       // values (i.e., it either does not contain boundary values or it contains
@@ -803,7 +805,7 @@ namespace VectorTools
       // interpolate the boundary values and then condense the matrix and vector
       if (constraints_are_compatible)
         {
-          const Function<spacedim> *dummy = 0;
+          const Function<spacedim,number> *dummy = 0;
           MatrixCreator::create_mass_matrix (mapping, dof, quadrature,
                                              mass_matrix, function, tmp,
                                              dummy, constraints);
@@ -827,10 +829,10 @@ namespace VectorTools
       // steps may not be sufficient, since roundoff errors may accumulate for
       // badly conditioned matrices
       ReductionControl      control(5*tmp.size(), 0., 1e-12, false, false);
-      GrowingVectorMemory<> memory;
-      SolverCG<>            cg(control,memory);
+      GrowingVectorMemory<Vector<number> > memory;
+      SolverCG<Vector<number> >            cg(control,memory);
 
-      PreconditionSSOR<> prec;
+      PreconditionSSOR<SparseMatrix<number> > prec;
       prec.initialize(mass_matrix, 1.2);
 
       cg.solve (mass_matrix, vec, tmp, prec);
@@ -851,7 +853,7 @@ namespace VectorTools
                 const DoFHandler<dim,spacedim> &dof,
                 const ConstraintMatrix         &constraints,
                 const Quadrature<dim>          &quadrature,
-                const Function<spacedim>       &function,
+                const Function<spacedim, typename VectorType::value_type>       &function,
                 VectorType                     &vec_result,
                 const bool                     enforce_zero_boundary,
                 const Quadrature<dim-1>        &q_boundary,
@@ -868,7 +870,7 @@ namespace VectorTools
   void project (const DoFHandler<dim,spacedim> &dof,
                 const ConstraintMatrix         &constraints,
                 const Quadrature<dim>          &quadrature,
-                const Function<spacedim>       &function,
+                const Function<spacedim, typename VectorType::value_type>       &function,
                 VectorType                     &vec,
                 const bool                     enforce_zero_boundary,
                 const Quadrature<dim-1>        &q_boundary,
@@ -885,7 +887,7 @@ namespace VectorTools
                 const hp::DoFHandler<dim,spacedim>         &dof,
                 const ConstraintMatrix                     &constraints,
                 const hp::QCollection<dim>                 &quadrature,
-                const Function<spacedim>                   &function,
+                const Function<spacedim, typename VectorType::value_type>                   &function,
                 VectorType                                 &vec_result,
                 const bool                                 enforce_zero_boundary,
                 const hp::QCollection<dim-1>               &q_boundary,
@@ -902,7 +904,7 @@ namespace VectorTools
   void project (const hp::DoFHandler<dim,spacedim> &dof,
                 const ConstraintMatrix             &constraints,
                 const hp::QCollection<dim>         &quadrature,
-                const Function<spacedim>           &function,
+                const Function<spacedim, typename VectorType::value_type>           &function,
                 VectorType                         &vec,
                 const bool                         enforce_zero_boundary,
                 const hp::QCollection<dim-1>       &q_boundary,
@@ -1665,14 +1667,14 @@ namespace VectorTools
     // faces are points and it is far
     // easier to simply work on
     // individual vertices
-    template <typename DoFHandlerType, template <int,int> class M_or_MC>
+    template <typename number, typename DoFHandlerType, template <int,int> class M_or_MC>
     static inline
     void do_interpolate_boundary_values
     (const M_or_MC<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &,
-     const DoFHandlerType                                              &dof,
-     const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
-     std::map<types::global_dof_index,double>                          &boundary_values,
-     const ComponentMask                                               &component_mask,
+     const DoFHandlerType                                                                        &dof,
+     const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+     std::map<types::global_dof_index,number>                                                    &boundary_values,
+     const ComponentMask                                                                         &component_mask,
      const dealii::internal::int2type<1>)
     {
       const unsigned int dim = DoFHandlerType::dimension;
@@ -1697,7 +1699,7 @@ namespace VectorTools
               &&
               (function_map.find(cell->face(direction)->boundary_id()) != function_map.end()))
             {
-              const Function<DoFHandlerType::space_dimension> &boundary_function
+              const Function<DoFHandlerType::space_dimension,number> &boundary_function
                 = *function_map.find(cell->face(direction)->boundary_id())->second;
 
               // get the FE corresponding to this
@@ -1725,7 +1727,7 @@ namespace VectorTools
               // of the number of
               // components of the
               // function
-              Vector<double> function_values (fe.n_components());
+              Vector<number> function_values (fe.n_components());
               if (fe.n_components() == 1)
                 function_values(0)
                   = boundary_function.value (cell->vertex(direction));
@@ -1748,15 +1750,15 @@ namespace VectorTools
     // dim_, it is clearly less specialized than the 1d function above and
     // whenever possible (i.e., if dim==1), the function template above
     // will be used
-    template <typename DoFHandlerType, template <int,int> class M_or_MC, int dim_>
+    template <typename number, typename DoFHandlerType, template <int,int> class M_or_MC, int dim_>
     static inline
     void
     do_interpolate_boundary_values
-    (const M_or_MC<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
-     const DoFHandlerType                                                      &dof,
-     const typename FunctionMap<DoFHandlerType::space_dimension>::type         &function_map,
-     std::map<types::global_dof_index,double>                                  &boundary_values,
-     const ComponentMask                                                       &component_mask,
+    (const M_or_MC<DoFHandlerType::dimension, DoFHandlerType::space_dimension>                   &mapping,
+     const DoFHandlerType                                                                        &dof,
+     const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+     std::map<types::global_dof_index,number>                                                    &boundary_values,
+     const ComponentMask                                                                         &component_mask,
      const dealii::internal::int2type<dim_>)
     {
       const unsigned int dim = DoFHandlerType::dimension;
@@ -1780,7 +1782,7 @@ namespace VectorTools
       const unsigned int        n_components = DoFTools::n_components(dof);
       const bool                fe_is_system = (n_components != 1);
 
-      for (typename FunctionMap<spacedim>::type::const_iterator i=function_map.begin();
+      for (typename std::map<types::boundary_id, const Function<spacedim,number>*>::const_iterator i=function_map.begin();
            i!=function_map.end(); ++i)
         Assert (n_components == i->second->n_components,
                 ExcDimensionMismatch(n_components, i->second->n_components));
@@ -1795,8 +1797,8 @@ namespace VectorTools
       // array to store the values of the boundary function at the boundary
       // points. have two arrays for scalar and vector functions to use the
       // more efficient one respectively
-      std::vector<double>          dof_values_scalar;
-      std::vector<Vector<double> > dof_values_system;
+      std::vector<number>          dof_values_scalar;
+      std::vector<Vector<number> > dof_values_system;
       dof_values_scalar.reserve (DoFTools::max_dofs_per_face (dof));
       dof_values_system.reserve (DoFTools::max_dofs_per_face (dof));
 
@@ -1909,7 +1911,7 @@ namespace VectorTools
                       // allocating temporary if possible
                       if (dof_values_system.size() < fe.dofs_per_face)
                         dof_values_system.resize (fe.dofs_per_face,
-                                                  Vector<double>(fe.n_components()));
+                                                  Vector<number>(fe.n_components()));
                       else
                         dof_values_system.resize (fe.dofs_per_face);
 
@@ -1991,15 +1993,14 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
-
   interpolate_boundary_values
-  (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
-   const DoFHandlerType                                                      &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type         &function_map,
-   std::map<types::global_dof_index,double>                                  &boundary_values,
-   const ComponentMask                                                       &component_mask_)
+  (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension>                   &mapping,
+   const DoFHandlerType                                                                        &dof,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+   std::map<types::global_dof_index,number>                                                    &boundary_values,
+   const ComponentMask                                                                         &component_mask_)
   {
     do_interpolate_boundary_values (mapping, dof, function_map, boundary_values,
                                     component_mask_,
@@ -2008,31 +2009,31 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
    const DoFHandlerType                                                      &dof,
    const types::boundary_id                                                   boundary_component,
-   const Function<DoFHandlerType::space_dimension>                           &boundary_function,
-   std::map<types::global_dof_index,double>                                  &boundary_values,
+   const Function<DoFHandlerType::space_dimension,number>                    &boundary_function,
+   std::map<types::global_dof_index,number>                                  &boundary_values,
    const ComponentMask                                                       &component_mask)
   {
-    typename FunctionMap<DoFHandlerType::space_dimension>::type function_map;
+    std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> function_map;
     function_map[boundary_component] = &boundary_function;
     interpolate_boundary_values (mapping, dof, function_map, boundary_values,
                                  component_mask);
   }
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
   interpolate_boundary_values
-  (const hp::MappingCollection<dim,spacedim>  &mapping,
-   const hp::DoFHandler<dim,spacedim>         &dof,
-   const typename FunctionMap<spacedim>::type &function_map,
-   std::map<types::global_dof_index,double>   &boundary_values,
-   const ComponentMask                        &component_mask_)
+  (const hp::MappingCollection<dim,spacedim>                            &mapping,
+   const hp::DoFHandler<dim,spacedim>                                   &dof,
+   const std::map<types::boundary_id, const Function<spacedim,number>*> &function_map,
+   std::map<types::global_dof_index,number>                             &boundary_values,
+   const ComponentMask                                                  &component_mask_)
   {
     do_interpolate_boundary_values (mapping, dof, function_map, boundary_values,
                                     component_mask_,
@@ -2041,14 +2042,14 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
-  (const DoFHandlerType                            &dof,
-   const types::boundary_id                         boundary_component,
-   const Function<DoFHandlerType::space_dimension> &boundary_function,
-   std::map<types::global_dof_index,double>        &boundary_values,
-   const ComponentMask                             &component_mask)
+  (const DoFHandlerType                                   &dof,
+   const types::boundary_id                                boundary_component,
+   const Function<DoFHandlerType::space_dimension,number> &boundary_function,
+   std::map<types::global_dof_index,number>               &boundary_values,
+   const ComponentMask                                    &component_mask)
   {
     interpolate_boundary_values(StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
                                 dof, boundary_component,
@@ -2057,13 +2058,13 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
-  (const DoFHandlerType                                              &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
-   std::map<types::global_dof_index,double>                          &boundary_values,
-   const ComponentMask                                               &component_mask)
+  (const DoFHandlerType                                                                        &dof,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+   std::map<types::global_dof_index,number>                                                    &boundary_values,
+   const ComponentMask                                                                         &component_mask)
   {
     interpolate_boundary_values
     (StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
@@ -2078,19 +2079,19 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
-  (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
-   const DoFHandlerType                                                      &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type         &function_map,
-   ConstraintMatrix                                                          &constraints,
-   const ComponentMask                                                       &component_mask_)
+  (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension>                   &mapping,
+   const DoFHandlerType                                                                        &dof,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+   ConstraintMatrix                                                                            &constraints,
+   const ComponentMask                                                                         &component_mask_)
   {
-    std::map<types::global_dof_index,double> boundary_values;
+    std::map<types::global_dof_index,number> boundary_values;
     interpolate_boundary_values (mapping, dof, function_map,
                                  boundary_values, component_mask_);
-    std::map<types::global_dof_index,double>::const_iterator boundary_value =
+    typename std::map<types::global_dof_index,number>::const_iterator boundary_value =
       boundary_values.begin();
     for ( ; boundary_value !=boundary_values.end(); ++boundary_value)
       {
@@ -2107,17 +2108,17 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
   (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
    const DoFHandlerType                                                      &dof,
    const types::boundary_id                                                   boundary_component,
-   const Function<DoFHandlerType::space_dimension>                           &boundary_function,
+   const Function<DoFHandlerType::space_dimension,number>                    &boundary_function,
    ConstraintMatrix                                                          &constraints,
    const ComponentMask                                                       &component_mask)
   {
-    typename FunctionMap<DoFHandlerType::space_dimension>::type function_map;
+    std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> function_map;
     function_map[boundary_component] = &boundary_function;
     interpolate_boundary_values (mapping, dof, function_map, constraints,
                                  component_mask);
@@ -2125,14 +2126,14 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
-  (const DoFHandlerType                            &dof,
-   const types::boundary_id                         boundary_component,
-   const Function<DoFHandlerType::space_dimension> &boundary_function,
-   ConstraintMatrix                                &constraints,
-   const ComponentMask                             &component_mask)
+  (const DoFHandlerType                                   &dof,
+   const types::boundary_id                                boundary_component,
+   const Function<DoFHandlerType::space_dimension,number> &boundary_function,
+   ConstraintMatrix                                       &constraints,
+   const ComponentMask                                    &component_mask)
   {
     interpolate_boundary_values
     (StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
@@ -2142,13 +2143,13 @@ namespace VectorTools
 
 
 
-  template <typename DoFHandlerType>
+  template <typename DoFHandlerType, typename number>
   void
   interpolate_boundary_values
-  (const DoFHandlerType                                              &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
-   ConstraintMatrix                                                  &constraints,
-   const ComponentMask                                               &component_mask)
+  (const DoFHandlerType                                                                        &dof,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &function_map,
+   ConstraintMatrix                                                                            &constraints,
+   const ComponentMask                                                                         &component_mask)
   {
     interpolate_boundary_values
     (StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
@@ -2165,14 +2166,14 @@ namespace VectorTools
   namespace
   {
     template <int dim, int spacedim, template <int, int> class DoFHandlerType,
-              template <int,int> class M_or_MC, template <int> class Q_or_QC>
+              template <int,int> class M_or_MC, template <int> class Q_or_QC, typename number>
     void
-    do_project_boundary_values (const M_or_MC<dim, spacedim>               &mapping,
-                                const DoFHandlerType<dim, spacedim>        &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_functions,
-                                const Q_or_QC<dim-1>                       &q,
-                                std::map<types::global_dof_index,double>   &boundary_values,
-                                std::vector<unsigned int>                   component_mapping)
+    do_project_boundary_values (const M_or_MC<dim, spacedim>                                         &mapping,
+                                const DoFHandlerType<dim, spacedim>                                  &dof,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                                const Q_or_QC<dim-1>                                                 &q,
+                                std::map<types::global_dof_index,number>                             &boundary_values,
+                                std::vector<unsigned int>                                             component_mapping)
     {
       // in 1d, projection onto the 0d end points == interpolation
       if (dim == 1)
@@ -2204,7 +2205,7 @@ namespace VectorTools
 
       std::vector<types::global_dof_index> dof_to_boundary_mapping;
       std::set<types::boundary_id> selected_boundary_components;
-      for (typename FunctionMap<spacedim>::type::const_iterator i=boundary_functions.begin();
+      for (typename std::map<types::boundary_id, const Function<spacedim,number>*>::const_iterator i=boundary_functions.begin();
            i!=boundary_functions.end(); ++i)
         selected_boundary_components.insert (i->first);
 
@@ -2216,8 +2217,8 @@ namespace VectorTools
         return;
 
       // set up sparsity structure
-      DynamicSparsityPattern dsp(dof.n_boundary_dofs (boundary_functions),
-                                 dof.n_boundary_dofs (boundary_functions));
+      DynamicSparsityPattern dsp(dof.n_boundary_dofs(boundary_functions),
+                                 dof.n_boundary_dofs(boundary_functions));
       DoFTools::make_boundary_sparsity_pattern (dof,
                                                 boundary_functions,
                                                 dof_to_boundary_mapping,
@@ -2266,13 +2267,13 @@ namespace VectorTools
 
 
       // make mass matrix and right hand side
-      SparseMatrix<double> mass_matrix(sparsity);
-      Vector<double>       rhs(sparsity.n_rows());
+      SparseMatrix<number> mass_matrix(sparsity);
+      Vector<number>       rhs(sparsity.n_rows());
 
 
       MatrixCreator::create_boundary_mass_matrix (mapping, dof, q,
                                                   mass_matrix, boundary_functions,
-                                                  rhs, dof_to_boundary_mapping, (const Function<spacedim> *) 0,
+                                                  rhs, dof_to_boundary_mapping, (const Function<spacedim,number> *) 0,
                                                   component_mapping);
 
       // For certain weird elements,
@@ -2287,11 +2288,11 @@ namespace VectorTools
 
 //TODO: Maybe we should figure out if the element really needs this
 
-      FilteredMatrix<Vector<double> > filtered_mass_matrix(mass_matrix, true);
-      FilteredMatrix<Vector<double> > filtered_precondition;
+      FilteredMatrix<Vector<number> > filtered_mass_matrix(mass_matrix, true);
+      FilteredMatrix<Vector<number> > filtered_precondition;
       std::vector<bool> excluded_dofs(mass_matrix.m(), false);
 
-      double max_element = 0.;
+      number max_element = 0.;
       for (unsigned int i=0; i<mass_matrix.m(); ++i)
         if (mass_matrix.diag_element(i) > max_element)
           max_element = mass_matrix.diag_element(i);
@@ -2305,11 +2306,11 @@ namespace VectorTools
             excluded_dofs[i] = true;
           }
 
-      Vector<double> boundary_projection (rhs.size());
+      Vector<number> boundary_projection (rhs.size());
 
       // cannot reduce residual in a useful way if we are close to the square
       // root of the minimal double value
-      if (rhs.norm_sqr() < 1e28 * std::numeric_limits<double>::min())
+      if (rhs.norm_sqr() < 1e28 * std::numeric_limits<number>::min())
         boundary_projection = 0;
       else
         {
@@ -2317,10 +2318,10 @@ namespace VectorTools
           // steps may not be sufficient, since roundoff errors may accumulate for
           // badly conditioned matrices
           ReductionControl        control(5*rhs.size(), 0., 1.e-12, false, false);
-          GrowingVectorMemory<> memory;
-          SolverCG<>              cg(control,memory);
+          GrowingVectorMemory<Vector<number> > memory;
+          SolverCG<Vector<number> >              cg(control,memory);
 
-          PreconditionSSOR<> prec;
+          PreconditionSSOR<SparseMatrix<number> > prec;
           prec.initialize(mass_matrix, 1.2);
           filtered_precondition.initialize(prec, true);
           // solve
@@ -2347,14 +2348,14 @@ namespace VectorTools
     }
   }
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
-  project_boundary_values (const Mapping<dim, spacedim>   &mapping,
-                           const DoFHandler<dim, spacedim> &dof,
-                           const typename FunctionMap<spacedim>::type &boundary_functions,
-                           const Quadrature<dim-1>        &q,
-                           std::map<types::global_dof_index,double>  &boundary_values,
-                           std::vector<unsigned int>       component_mapping)
+  project_boundary_values (const Mapping<dim, spacedim>                                         &mapping,
+                           const DoFHandler<dim, spacedim>                                      &dof,
+                           const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                           const Quadrature<dim-1>                                              &q,
+                           std::map<types::global_dof_index,number>                             &boundary_values,
+                           std::vector<unsigned int>                                             component_mapping)
   {
     do_project_boundary_values(mapping, dof, boundary_functions, q,
                                boundary_values, component_mapping);
@@ -2362,13 +2363,13 @@ namespace VectorTools
 
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
-  project_boundary_values (const DoFHandler<dim,spacedim>    &dof,
-                           const typename FunctionMap<spacedim>::type &boundary_functions,
-                           const Quadrature<dim-1>  &q,
-                           std::map<types::global_dof_index,double> &boundary_values,
-                           std::vector<unsigned int> component_mapping)
+  project_boundary_values (const DoFHandler<dim,spacedim>                                       &dof,
+                           const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                           const Quadrature<dim-1>                                              &q,
+                           std::map<types::global_dof_index,number>                             &boundary_values,
+                           std::vector<unsigned int>                                             component_mapping)
   {
     project_boundary_values(StaticMappingQ1<dim,spacedim>::mapping, dof, boundary_functions, q,
                             boundary_values, component_mapping);
@@ -2376,13 +2377,13 @@ namespace VectorTools
 
 
 
-  template <int dim, int spacedim>
-  void project_boundary_values (const hp::MappingCollection<dim, spacedim>       &mapping,
-                                const hp::DoFHandler<dim,spacedim>    &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_functions,
-                                const hp::QCollection<dim-1>  &q,
-                                std::map<types::global_dof_index,double> &boundary_values,
-                                std::vector<unsigned int> component_mapping)
+  template <int dim, int spacedim, typename number>
+  void project_boundary_values (const hp::MappingCollection<dim, spacedim>                           &mapping,
+                                const hp::DoFHandler<dim,spacedim>                                   &dof,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                                const hp::QCollection<dim-1>                                         &q,
+                                std::map<types::global_dof_index,number>                             &boundary_values,
+                                std::vector<unsigned int>                                             component_mapping)
   {
     do_project_boundary_values (mapping, dof,
                                 boundary_functions,
@@ -2392,12 +2393,12 @@ namespace VectorTools
 
 
 
-  template <int dim, int spacedim>
-  void project_boundary_values (const hp::DoFHandler<dim,spacedim>    &dof,
-                                const typename FunctionMap<spacedim>::type &boundary_function,
-                                const hp::QCollection<dim-1>  &q,
-                                std::map<types::global_dof_index,double> &boundary_values,
-                                std::vector<unsigned int> component_mapping)
+  template <int dim, int spacedim, typename number>
+  void project_boundary_values (const hp::DoFHandler<dim,spacedim>                                   &dof,
+                                const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_function,
+                                const hp::QCollection<dim-1>                                         &q,
+                                std::map<types::global_dof_index,number>                             &boundary_values,
+                                std::vector<unsigned int>                                             component_mapping)
   {
     project_boundary_values (hp::StaticMappingQ1<dim,spacedim>::mapping_collection, dof,
                              boundary_function,
@@ -2410,19 +2411,19 @@ namespace VectorTools
 
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
-  project_boundary_values (const Mapping<dim, spacedim>       &mapping,
-                           const DoFHandler<dim,spacedim>    &dof,
-                           const typename FunctionMap<spacedim>::type &boundary_functions,
-                           const Quadrature<dim-1>  &q,
-                           ConstraintMatrix &constraints,
-                           std::vector<unsigned int> component_mapping)
+  project_boundary_values (const Mapping<dim, spacedim>                                         &mapping,
+                           const DoFHandler<dim,spacedim>                                       &dof,
+                           const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                           const Quadrature<dim-1>                                              &q,
+                           ConstraintMatrix                                                     &constraints,
+                           std::vector<unsigned int>                                             component_mapping)
   {
-    std::map<types::global_dof_index,double> boundary_values;
+    std::map<types::global_dof_index,number> boundary_values;
     project_boundary_values (mapping, dof, boundary_functions, q,
                              boundary_values, component_mapping);
-    std::map<types::global_dof_index,double>::const_iterator boundary_value =
+    typename std::map<types::global_dof_index,number>::const_iterator boundary_value =
       boundary_values.begin();
     for ( ; boundary_value !=boundary_values.end(); ++boundary_value)
       {
@@ -2437,13 +2438,13 @@ namespace VectorTools
 
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
-  project_boundary_values (const DoFHandler<dim,spacedim>    &dof,
-                           const typename FunctionMap<spacedim>::type &boundary_functions,
-                           const Quadrature<dim-1>  &q,
-                           ConstraintMatrix &constraints,
-                           std::vector<unsigned int> component_mapping)
+  project_boundary_values (const DoFHandler<dim,spacedim>                                       &dof,
+                           const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                           const Quadrature<dim-1>                                              &q,
+                           ConstraintMatrix                                                     &constraints,
+                           std::vector<unsigned int>                                             component_mapping)
   {
     project_boundary_values(StaticMappingQ1<dim,spacedim>::mapping, dof, boundary_functions, q,
                             constraints, component_mapping);
index 4627df38611e0ac97544040fb48f81b20bb74443..9b992decb3e23d6f42d38ec2ac5736d433cd631e 100644 (file)
@@ -1004,12 +1004,13 @@ types::global_dof_index DoFHandler<1>::n_boundary_dofs () const
 
 
 template <>
-types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_ids) const
+template <typename number>
+types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::map<types::boundary_id, const Function<1,number>*> &boundary_ids) const
 {
   // check that only boundary
   // indicators 0 and 1 are allowed
   // in 1d
-  for (FunctionMap::const_iterator i=boundary_ids.begin();
+  for (typename std::map<types::boundary_id, const Function<1,number>*>::const_iterator i=boundary_ids.begin();
        i!=boundary_ids.end(); ++i)
     Assert ((i->first == 0) || (i->first == 1),
             ExcInvalidBoundaryIndicator());
@@ -1043,12 +1044,13 @@ types::global_dof_index DoFHandler<1,2>::n_boundary_dofs () const
 
 
 template <>
-types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &boundary_ids) const
+template <typename number>
+types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const std::map<types::boundary_id, const Function<2,number>*> &boundary_ids) const
 {
   // check that only boundary
   // indicators 0 and 1 are allowed
   // in 1d
-  for (FunctionMap::const_iterator i=boundary_ids.begin();
+  for (typename std::map<types::boundary_id, const Function<2,number>*>::const_iterator i=boundary_ids.begin();
        i!=boundary_ids.end(); ++i)
     Assert ((i->first == 0) || (i->first == 1),
             ExcInvalidBoundaryIndicator());
@@ -1113,8 +1115,9 @@ types::global_dof_index DoFHandler<dim,spacedim>::n_boundary_dofs () const
 
 
 template<int dim, int spacedim>
+template<typename number>
 types::global_dof_index
-DoFHandler<dim,spacedim>::n_boundary_dofs (const FunctionMap &boundary_ids) const
+DoFHandler<dim,spacedim>::n_boundary_dofs (const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_ids) const
 {
   Assert (boundary_ids.find(numbers::internal_face_boundary_id) == boundary_ids.end(),
           ExcInvalidBoundaryIndicator());
index 8780b8cb0878d1cb8ded48228c7fb845bb5f20f5..17dcab09ff4b58ce7d9f7db2f3ffb0f042e7ce21 100644 (file)
 // ---------------------------------------------------------------------
 
 
+for (scalar: REAL_SCALARS; deal_II_dimension : DIMENSIONS)
+  {
+    template types::global_dof_index DoFHandler<deal_II_dimension>::n_boundary_dofs<scalar> (const std::map<types::boundary_id, const Function<deal_II_dimension,scalar>*> &boundary_ids) const;
+    
+#if deal_II_dimension < 3
+    template types::global_dof_index DoFHandler<deal_II_dimension,deal_II_dimension+1>::n_boundary_dofs<scalar> (const std::map<types::boundary_id, const Function<deal_II_dimension+1,scalar>*> &boundary_ids) const;
+#endif
+    
+  }
 
 for (deal_II_dimension : DIMENSIONS)
   {
index 733f2189cdce5f460eaad12a928ab6229e843741..eb98b99c72fe86e7634dc9ff4bf6aa1e6b21419b 100644 (file)
@@ -338,7 +338,7 @@ namespace DoFTools
       {
         // there are only 2 boundary indicators in 1d, so it is no
         // performance problem to call the other function
-        typename DoFHandlerType::FunctionMap boundary_ids;
+        std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,double>*> boundary_ids;
         boundary_ids[0] = 0;
         boundary_ids[1] = 0;
         make_boundary_sparsity_pattern<DoFHandlerType, SparsityPatternType>
@@ -397,10 +397,10 @@ namespace DoFTools
 
 
 
-  template <typename DoFHandlerType, typename SparsityPatternType>
+  template <typename DoFHandlerType, typename SparsityPatternType, typename number>
   void make_boundary_sparsity_pattern
   (const DoFHandlerType                                              &dof,
-   const typename FunctionMap<DoFHandlerType::space_dimension>::type &boundary_ids,
+   const std::map<types::boundary_id, const Function<DoFHandlerType::space_dimension,number>*> &boundary_ids,
    const std::vector<types::global_dof_index>                        &dof_to_boundary_mapping,
    SparsityPatternType                                               &sparsity)
   {
index dc2f35246cf2921106ed23b9088366f9422fd99c..2aa9dabccfee1b6c5ec77d3b515dd48eb8ab3433 100644 (file)
 //
 // ---------------------------------------------------------------------
 
+for (scalar: REAL_SCALARS; SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS)
+  {
+    template void
+    DoFTools::make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension>,SP,scalar>
+    (const DoFHandler<deal_II_dimension>& dof,
+     const std::map<types::boundary_id, const Function<deal_II_dimension,scalar>*> &boundary_ids,
+     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
+     SP    &sparsity);
+     
+    template void
+    DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<deal_II_dimension>,SP,scalar>
+    (const hp::DoFHandler<deal_II_dimension>& dof,
+     const std::map<types::boundary_id, const Function<deal_II_dimension,scalar>*> &boundary_ids,
+     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
+     SP    &sparsity);
+     
+#if deal_II_dimension < 3
+    template void
+    DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>,SP,scalar>
+    (const hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>& dof,
+     const std::map<types::boundary_id, const Function<deal_II_dimension+1,scalar>*>  &boundary_ids,
+     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
+     SP    &sparsity);
+     
+    template void
+    DoFTools::make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension,deal_II_dimension+1>,SP,scalar>
+    (const DoFHandler<deal_II_dimension,deal_II_dimension+1>& dof,
+     const std::map<types::boundary_id, const Function<deal_II_dimension+1,scalar>*> &boundary_ids,
+     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
+     SP    &sparsity);
 
+    //template void
+    //DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>,SP,scalar>
+    //(const hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>& dof,
+    // const std::map<types::boundary_id, const Function<deal_II_dimension+1,scalar>*> &boundary_ids,
+    // const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
+    // SP    &sparsity);
+  
+#endif     
+     
+  }
 
 for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS)
   {
@@ -75,29 +115,6 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS)
      const std::vector<types::global_dof_index>  &,
      SP    &);
 
-    template void
-    DoFTools::make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension>,SP>
-    (const DoFHandler<deal_II_dimension>& dof,
-     const FunctionMap<deal_II_dimension>::type  &boundary_ids,
-     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
-     SP    &sparsity);
-
-    template void
-    DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<deal_II_dimension>,SP>
-    (const hp::DoFHandler<deal_II_dimension>& dof,
-     const FunctionMap<deal_II_dimension>::type  &boundary_ids,
-     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
-     SP    &sparsity);
-
-#if deal_II_dimension < 3
-    template void
-    DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>,SP>
-    (const hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>& dof,
-     const FunctionMap<deal_II_dimension+1>::type  &boundary_ids,
-     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
-     SP    &sparsity);
- #endif
-
     template void
     DoFTools::make_flux_sparsity_pattern<DoFHandler<deal_II_dimension>,SP>
     (const DoFHandler<deal_II_dimension> &dof,
@@ -201,20 +218,6 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS)
     // const std::vector<types::global_dof_index>  &,
     // SP    &);
 
-    template void
-    DoFTools::make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension,deal_II_dimension+1>,SP>
-    (const DoFHandler<deal_II_dimension,deal_II_dimension+1>& dof,
-     const FunctionMap<deal_II_dimension+1>::type  &boundary_ids,
-     const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
-     SP    &sparsity);
-
-    //template void
-    //DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>,SP>
-    //(const hp::DoFHandler<deal_II_dimension,deal_II_dimension+1>& dof,
-    // const FunctionMap<deal_II_dimension+1>::type  &boundary_ids,
-    // const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
-    // SP    &sparsity);
-
 #endif
 
 
@@ -279,16 +282,16 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS)
      SP    &);
 
     template void
-    DoFTools::make_boundary_sparsity_pattern<DoFHandler<1,3>,SP>
+    DoFTools::make_boundary_sparsity_pattern<DoFHandler<1,3>,SP,double>
     (const DoFHandler<1,3>& dof,
-     const FunctionMap<3>::type  &boundary_ids,
+     const std::map<types::boundary_id, const Function<3,double>*>  &boundary_ids,
      const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
      SP    &sparsity);
 
     template void
-    DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<1,3>,SP>
+    DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<1,3>,SP,double>
     (const hp::DoFHandler<1,3>& dof,
-     const FunctionMap<3>::type  &boundary_ids,
+     const std::map<types::boundary_id, const Function<3,double>*> &boundary_ids,
      const std::vector<types::global_dof_index>  &dof_to_boundary_mapping,
      SP    &sparsity);
 
index 3279b07d3469f87487b9953bba15f14e4c050411..da115ac68c79c47156847d34c3e6b9e4cbc962d6 100644 (file)
@@ -1832,14 +1832,15 @@ namespace hp
 
 
   template <>
-  types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_ids) const
+  template <typename number>
+  types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::map<types::boundary_id, const Function<1,number>*> &boundary_ids) const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
 
     // check that only boundary
     // indicators 0 and 1 are allowed
     // in 1d
-    for (FunctionMap::const_iterator i=boundary_ids.begin();
+    for (typename std::map<types::boundary_id, const Function<1,number>*>::const_iterator i=boundary_ids.begin();
          i!=boundary_ids.end(); ++i)
       Assert ((i->first == 0) || (i->first == 1),
               ExcInvalidBoundaryIndicator());
@@ -1916,7 +1917,8 @@ namespace hp
   }
 
   template <>
-  types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &) const
+  template <typename number>
+  types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const std::map<types::boundary_id, const Function<2,number>*> &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
@@ -1939,7 +1941,8 @@ namespace hp
   }
 
   template <>
-  types::global_dof_index DoFHandler<1,3>::n_boundary_dofs (const FunctionMap &) const
+  template <typename number>
+  types::global_dof_index DoFHandler<1,3>::n_boundary_dofs (const std::map<types::boundary_id, const Function<3,number>*> &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
@@ -1992,8 +1995,9 @@ namespace hp
 
 
   template<int dim, int spacedim>
+  template<typename number>
   types::global_dof_index
-  DoFHandler<dim,spacedim>::n_boundary_dofs (const FunctionMap &boundary_ids) const
+  DoFHandler<dim,spacedim>::n_boundary_dofs (const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_ids) const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
     Assert (boundary_ids.find(numbers::internal_face_boundary_id) == boundary_ids.end(),
@@ -2073,7 +2077,8 @@ namespace hp
 
 
   template <>
-  types::global_dof_index DoFHandler<2,3>::n_boundary_dofs (const FunctionMap &) const
+  template <typename number>
+  types::global_dof_index DoFHandler<2,3>::n_boundary_dofs (const std::map<types::boundary_id, const Function<3,number>*> &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
index a872a73729023aa36814bd5164ef76f2179d00f4..dff1f33058018f0fc1ece6f783a80a98b3cfe2be 100644 (file)
 //
 // ---------------------------------------------------------------------
 
+for (scalar: REAL_SCALARS; deal_II_dimension : DIMENSIONS)
+  {
+    namespace hp
+    \{
+      template types::global_dof_index DoFHandler<deal_II_dimension>::n_boundary_dofs<scalar> (const std::map<types::boundary_id, const Function<deal_II_dimension,scalar>*> &boundary_ids) const;
+    
+#if deal_II_dimension < 3
+      template types::global_dof_index DoFHandler<deal_II_dimension,deal_II_dimension+1>::n_boundary_dofs<scalar> (const std::map<types::boundary_id, const Function<deal_II_dimension+1,scalar>*> &boundary_ids) const;
+#endif
+    \}
+  }
+
 
 for (deal_II_dimension : DIMENSIONS)
 {
index 214d6023584a5d715de424398d31046b9faecf29..cfea9cf2cfe1fb7e06058b2b0f5253b568b732a1 100644 (file)
@@ -1283,6 +1283,7 @@ PARALLEL_VECTOR_FUNCTIONS(TrilinosWrappers::MPI::BlockVector);
       bool                             , \
       internal::bool2type<true>) const
 
+MATRIX_FUNCTIONS(SparseMatrix<long double>);
 MATRIX_FUNCTIONS(SparseMatrix<double>);
 MATRIX_FUNCTIONS(SparseMatrix<float>);
 MATRIX_FUNCTIONS(FullMatrix<double>);
index 78c03f8d5f35892370c9fb7a9a129505f6060117..4859a11632f8bbd43d5207b6ad6b4e85f6602788 100644 (file)
@@ -18,7 +18,7 @@ for (S: REAL_SCALARS; T : DEAL_II_VEC_TEMPLATES)
     template void ConstraintMatrix::condense<T<S> >(const T<S> &, T<S> &) const;
     template void ConstraintMatrix::condense<T<S> >(T<S> &vec) const;
     template void ConstraintMatrix::distribute_local_to_global<T<S> > (
-      const Vector<double>&, const std::vector<types::global_dof_index> &, T<S> &, const FullMatrix<double>&) const;
+      const Vector<S>&, const std::vector<types::global_dof_index> &, T<S> &, const FullMatrix<S>&) const;  
     template void ConstraintMatrix::set_zero<T<S> >(T<S> &) const;
   }
 
index ddd53584222366612c4e9751779270d681456d97..07a54505c5c02e60128aa7d2c832f3a6449d47c3 100644 (file)
@@ -137,13 +137,14 @@ namespace MatrixCreator
     namespace AssemblerData
     {
       template <int dim,
-                int spacedim>
+                int spacedim,
+                typename number>
       struct Scratch
       {
         Scratch (const ::dealii::hp::FECollection<dim,spacedim> &fe,
                  const UpdateFlags         update_flags,
-                 const Function<spacedim> *coefficient,
-                 const Function<spacedim> *rhs_function,
+                 const Function<spacedim,number> *coefficient,
+                 const Function<spacedim,number> *rhs_function,
                  const ::dealii::hp::QCollection<dim> &quadrature,
                  const ::dealii::hp::MappingCollection<dim,spacedim> &mapping)
           :
@@ -156,10 +157,10 @@ namespace MatrixCreator
                        update_flags),
           coefficient_values(quadrature_collection.max_n_quadrature_points()),
           coefficient_vector_values (quadrature_collection.max_n_quadrature_points(),
-                                     dealii::Vector<double> (fe_collection.n_components())),
+                                     dealii::Vector<number> (fe_collection.n_components())),
           rhs_values(quadrature_collection.max_n_quadrature_points()),
           rhs_vector_values(quadrature_collection.max_n_quadrature_points(),
-                            dealii::Vector<double> (fe_collection.n_components())),
+                            dealii::Vector<number> (fe_collection.n_components())),
           coefficient (coefficient),
           rhs_function (rhs_function),
           update_flags (update_flags)
@@ -189,13 +190,13 @@ namespace MatrixCreator
 
         ::dealii::hp::FEValues<dim,spacedim> x_fe_values;
 
-        std::vector<double>                  coefficient_values;
-        std::vector<dealii::Vector<double> > coefficient_vector_values;
-        std::vector<double>                  rhs_values;
-        std::vector<dealii::Vector<double> > rhs_vector_values;
+        std::vector<number>                  coefficient_values;
+        std::vector<dealii::Vector<number> > coefficient_vector_values;
+        std::vector<number>                  rhs_values;
+        std::vector<dealii::Vector<number> > rhs_vector_values;
 
-        const Function<spacedim>   *coefficient;
-        const Function<spacedim>   *rhs_function;
+        const Function<spacedim,number>   *coefficient;
+        const Function<spacedim,number>   *rhs_function;
 
         const UpdateFlags update_flags;
       };
@@ -217,7 +218,7 @@ namespace MatrixCreator
               typename CellIterator,
               typename number>
     void mass_assembler (const CellIterator &cell,
-                         MatrixCreator::internal::AssemblerData::Scratch<dim,spacedim> &data,
+                         MatrixCreator::internal::AssemblerData::Scratch<dim,spacedim,number> &data,
                          MatrixCreator::internal::AssemblerData::CopyData<number>      &copy_data)
     {
       data.x_fe_values.reinit (cell);
@@ -255,7 +256,7 @@ namespace MatrixCreator
           else
             {
               data.rhs_vector_values.resize (n_q_points,
-                                             dealii::Vector<double>(n_components));
+                                             dealii::Vector<number>(n_components));
               data.rhs_function->vector_value_list (fe_values.get_quadrature_points(),
                                                     data.rhs_vector_values);
             }
@@ -273,14 +274,14 @@ namespace MatrixCreator
           else
             {
               data.coefficient_vector_values.resize (n_q_points,
-                                                     dealii::Vector<double>(n_components));
+                                                     dealii::Vector<number>(n_components));
               data.coefficient->vector_value_list (fe_values.get_quadrature_points(),
                                                    data.coefficient_vector_values);
             }
         }
 
 
-      double add_data;
+      number add_data;
       const std::vector<double> &JxW = fe_values.get_JxW_values();
       for (unsigned int i=0; i<dofs_per_cell; ++i)
         if (fe.is_primitive ())
@@ -398,7 +399,7 @@ namespace MatrixCreator
               int spacedim,
               typename CellIterator>
     void laplace_assembler (const CellIterator &cell,
-                            MatrixCreator::internal::AssemblerData::Scratch<dim,spacedim> &data,
+                            MatrixCreator::internal::AssemblerData::Scratch<dim,spacedim,double> &data,
                             MatrixCreator::internal::AssemblerData::CopyData<double>      &copy_data)
     {
       data.x_fe_values.reinit (cell);
@@ -646,12 +647,12 @@ namespace MatrixCreator
 namespace MatrixCreator
 {
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const Mapping<dim,spacedim>       &mapping,
                            const DoFHandler<dim,spacedim>    &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     Assert (matrix.m() == dof.n_dofs(),
@@ -662,7 +663,7 @@ namespace MatrixCreator
     hp::FECollection<dim,spacedim>      fe_collection (dof.get_fe());
     hp::QCollection<dim>                q_collection (q);
     hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,number>
     assembler_data (fe_collection,
                     update_values | update_JxW_values |
                     (coefficient != 0 ? update_quadrature_points : UpdateFlags(0)),
@@ -688,11 +689,11 @@ namespace MatrixCreator
 
 
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const DoFHandler<dim,spacedim>    &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     create_mass_matrix(StaticMappingQ1<dim,spacedim>::mapping, dof,
@@ -701,14 +702,14 @@ namespace MatrixCreator
 
 
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const Mapping<dim,spacedim>       &mapping,
                            const DoFHandler<dim,spacedim>    &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim>      &rhs,
+                           const Function<spacedim,number>      &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     Assert (matrix.m() == dof.n_dofs(),
@@ -719,7 +720,7 @@ namespace MatrixCreator
     hp::FECollection<dim,spacedim>      fe_collection (dof.get_fe());
     hp::QCollection<dim>                q_collection (q);
     hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,number>
     assembler_data (fe_collection,
                     update_values |
                     update_JxW_values | update_quadrature_points,
@@ -744,13 +745,13 @@ namespace MatrixCreator
 
 
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const DoFHandler<dim,spacedim>    &dof,
                            const Quadrature<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim>      &rhs,
+                           const Function<spacedim,number>      &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     create_mass_matrix(StaticMappingQ1<dim,spacedim>::mapping,
@@ -760,12 +761,12 @@ namespace MatrixCreator
 
 
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::MappingCollection<dim,spacedim> &mapping,
                            const hp::DoFHandler<dim,spacedim>    &dof,
                            const hp::QCollection<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     Assert (matrix.m() == dof.n_dofs(),
@@ -773,7 +774,7 @@ namespace MatrixCreator
     Assert (matrix.n() == dof.n_dofs(),
             ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
 
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,number>
     assembler_data (dof.get_fe(),
                     update_values | update_JxW_values |
                     (coefficient != 0 ? update_quadrature_points : UpdateFlags(0)),
@@ -798,11 +799,11 @@ namespace MatrixCreator
 
 
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::DoFHandler<dim,spacedim> &dof,
                            const hp::QCollection<dim> &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     create_mass_matrix(hp::StaticMappingQ1<dim,spacedim>::mapping_collection,
@@ -811,14 +812,14 @@ namespace MatrixCreator
 
 
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::MappingCollection<dim,spacedim> &mapping,
                            const hp::DoFHandler<dim,spacedim> &dof,
                            const hp::QCollection<dim>    &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim>      &rhs,
+                           const Function<spacedim,number>      &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     Assert (matrix.m() == dof.n_dofs(),
@@ -826,7 +827,7 @@ namespace MatrixCreator
     Assert (matrix.n() == dof.n_dofs(),
             ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
 
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,number>
     assembler_data (dof.get_fe(),
                     update_values |
                     update_JxW_values | update_quadrature_points,
@@ -851,13 +852,13 @@ namespace MatrixCreator
 
 
 
-  template <int dim, typename number, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_mass_matrix (const hp::DoFHandler<dim,spacedim> &dof,
                            const hp::QCollection<dim> &q,
                            SparseMatrix<number>     &matrix,
-                           const Function<spacedim> &rhs,
+                           const Function<spacedim,number> &rhs,
                            Vector<number>           &rhs_vector,
-                           const Function<spacedim> *const coefficient,
+                           const Function<spacedim,number> *const coefficient,
                            const ConstraintMatrix   &constraints)
   {
     create_mass_matrix(hp::StaticMappingQ1<dim,spacedim>::mapping_collection, dof, q,
@@ -868,7 +869,7 @@ namespace MatrixCreator
 
   namespace
   {
-    template <int dim, int spacedim>
+    template <int dim, int spacedim, typename number>
     void
     create_boundary_mass_matrix_1 (typename DoFHandler<dim,spacedim>::active_cell_iterator const &cell,
                                    MatrixCreator::internal::AssemblerBoundary::Scratch const &,
@@ -877,8 +878,8 @@ namespace MatrixCreator
                                    Mapping<dim, spacedim> const &mapping,
                                    FiniteElement<dim,spacedim> const &fe,
                                    Quadrature<dim-1> const &q,
-                                   typename FunctionMap<spacedim>::type const &boundary_functions,
-                                   Function<spacedim> const *const coefficient,
+                                   std::map<types::boundary_id, const Function<spacedim,number>*> const &boundary_functions,
+                                   Function<spacedim,number> const *const coefficient,
                                    std::vector<unsigned int> const &component_mapping)
 
     {
@@ -904,15 +905,15 @@ namespace MatrixCreator
       // two variables for the coefficient,
       // one for the two cases indicated in
       // the name
-      std::vector<double>          coefficient_values (fe_values.n_quadrature_points, 1.);
-      std::vector<Vector<double> > coefficient_vector_values (fe_values.n_quadrature_points,
-                                                              Vector<double>(n_components));
+      std::vector<number>          coefficient_values (fe_values.n_quadrature_points, 1.);
+      std::vector<Vector<number> > coefficient_vector_values (fe_values.n_quadrature_points,
+                                                              Vector<number>(n_components));
       const bool coefficient_is_vector = (coefficient != 0 && coefficient->n_components != 1)
                                          ? true : false;
 
-      std::vector<double>          rhs_values_scalar (fe_values.n_quadrature_points);
-      std::vector<Vector<double> > rhs_values_system (fe_values.n_quadrature_points,
-                                                      Vector<double>(n_function_components));
+      std::vector<number>          rhs_values_scalar (fe_values.n_quadrature_points);
+      std::vector<Vector<number> > rhs_values_system (fe_values.n_quadrature_points,
+                                                      Vector<number>(n_function_components));
 
       copy_data.dofs.resize(copy_data.dofs_per_cell);
       cell->get_dof_indices (copy_data.dofs);
@@ -1071,13 +1072,13 @@ namespace MatrixCreator
           }
     }
 
-    template <int dim,int spacedim>
+    template <int dim, int spacedim, typename number>
     void copy_boundary_mass_matrix_1(MatrixCreator::internal::AssemblerBoundary::CopyData<DoFHandler<dim,
                                      spacedim> > const &copy_data,
-                                     typename FunctionMap<spacedim>::type const &boundary_functions,
+                                     std::map<types::boundary_id, const Function<spacedim,number>*> const &boundary_functions,
                                      std::vector<types::global_dof_index> const &dof_to_boundary_mapping,
-                                     SparseMatrix<double> &matrix,
-                                     Vector<double> &rhs_vector)
+                                     SparseMatrix<number> &matrix,
+                                     Vector<number> &rhs_vector)
     {
       // now transfer cell matrix and vector to the whole boundary matrix
       //
@@ -1139,34 +1140,67 @@ namespace MatrixCreator
 
     template <>
     void
-    create_boundary_mass_matrix_1<1,3> (DoFHandler<1,3>::active_cell_iterator const &/*cell*/,
-                                        MatrixCreator::internal::AssemblerBoundary::Scratch const &,
-                                        MatrixCreator::internal::AssemblerBoundary::CopyData<DoFHandler<1,
-                                        3> > &/*copy_data*/,
-                                        Mapping<1,3> const &,
-                                        FiniteElement<1,3> const &,
-                                        Quadrature<0> const &,
-                                        FunctionMap<3>::type const &/*boundary_functions*/,
-                                        Function<3> const *const /*coefficient*/,
-                                        std::vector<unsigned int> const &/*component_mapping*/)
+    create_boundary_mass_matrix_1<1,3,float> (DoFHandler<1,3>::active_cell_iterator const &/*cell*/,
+                                              MatrixCreator::internal::AssemblerBoundary::Scratch const &,
+                                              MatrixCreator::internal::AssemblerBoundary::CopyData<DoFHandler<1,
+                                              3> > &/*copy_data*/,
+                                              Mapping<1,3> const &,
+                                              FiniteElement<1,3> const &,
+                                              Quadrature<0> const &,
+                                              std::map<types::boundary_id, const Function<3,float>*> const &/*boundary_functions*/,
+                                              Function<3,float> const *const /*coefficient*/,
+                                              std::vector<unsigned int> const &/*component_mapping*/)
+    {
+      Assert(false,ExcNotImplemented());
+    }
+
+    template <>
+    void
+    create_boundary_mass_matrix_1<1,3,double> (DoFHandler<1,3>::active_cell_iterator const &/*cell*/,
+                                               MatrixCreator::internal::AssemblerBoundary::Scratch const &,
+                                               MatrixCreator::internal::AssemblerBoundary::CopyData<DoFHandler<1,
+                                               3> > &/*copy_data*/,
+                                               Mapping<1,3> const &,
+                                               FiniteElement<1,3> const &,
+                                               Quadrature<0> const &,
+                                               std::map<types::boundary_id, const Function<3,double>*> const &/*boundary_functions*/,
+                                               Function<3,double> const *const /*coefficient*/,
+                                               std::vector<unsigned int> const &/*component_mapping*/)
+    {
+      Assert(false,ExcNotImplemented());
+    }
+
+    template <>
+    void
+    create_boundary_mass_matrix_1<1,3,long double> (DoFHandler<1,3>::active_cell_iterator const &/*cell*/,
+                                                    MatrixCreator::internal::AssemblerBoundary::Scratch const &,
+                                                    MatrixCreator::internal::AssemblerBoundary::CopyData<DoFHandler<1,
+                                                    3> > &/*copy_data*/,
+                                                    Mapping<1,3> const &,
+                                                    FiniteElement<1,3> const &,
+                                                    Quadrature<0> const &,
+                                                    std::map<types::boundary_id, const Function<3,long double>*> const &/*boundary_functions*/,
+                                                    Function<3,long double> const *const /*coefficient*/,
+                                                    std::vector<unsigned int> const &/*component_mapping*/)
     {
       Assert(false,ExcNotImplemented());
     }
+
   }
 
 
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix (const Mapping<dim, spacedim>  &mapping,
                                const DoFHandler<dim,spacedim> &dof,
                                const Quadrature<dim-1>  &q,
-                               SparseMatrix<double>  &matrix,
-                               const typename FunctionMap<spacedim>::type  &boundary_functions,
-                               Vector<double>            &rhs_vector,
+                               SparseMatrix<number>  &matrix,
+                               const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                               Vector<number>            &rhs_vector,
                                std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                               const Function<spacedim> *const coefficient,
+                               const Function<spacedim,number> *const coefficient,
                                std::vector<unsigned int> component_mapping)
   {
     // what would that be in 1d? the
@@ -1181,7 +1215,7 @@ namespace MatrixCreator
     const FiniteElement<dim,spacedim> &fe = dof.get_fe();
     const unsigned int n_components  = fe.n_components();
 
-    Assert (matrix.n() == dof.n_boundary_dofs(boundary_functions),
+    Assert (matrix.n() == dof.n_boundary_dofs (boundary_functions),
             ExcInternalError());
     Assert (matrix.n() == matrix.m(), ExcInternalError());
     Assert (matrix.n() == rhs_vector.size(), ExcInternalError());
@@ -1208,14 +1242,14 @@ namespace MatrixCreator
                     static_cast<std_cxx11::function<void (typename DoFHandler<dim,spacedim>::active_cell_iterator
                                                           const &,MatrixCreator::internal::AssemblerBoundary::Scratch const &,
                                                           MatrixCreator::internal::AssemblerBoundary::CopyData<DoFHandler<dim,spacedim> > &)> >
-                    (std_cxx11::bind(&create_boundary_mass_matrix_1<dim,spacedim>,std_cxx11::_1,std_cxx11::_2,
+                    (std_cxx11::bind(&create_boundary_mass_matrix_1<dim,spacedim,number>,std_cxx11::_1,std_cxx11::_2,
                                      std_cxx11::_3,
                                      std_cxx11::cref(mapping),std_cxx11::cref(fe),std_cxx11::cref(q),
                                      std_cxx11::cref(boundary_functions),coefficient,
                                      std_cxx11::cref(component_mapping))),
                     static_cast<std_cxx11::function<void (MatrixCreator::internal::AssemblerBoundary
                                                           ::CopyData<DoFHandler<dim,spacedim> > const &)> > (std_cxx11::bind(
-                                                                &copy_boundary_mass_matrix_1<dim,spacedim>,
+                                                                &copy_boundary_mass_matrix_1<dim,spacedim,number>,
                                                                 std_cxx11::_1,
                                                                 std_cxx11::cref(boundary_functions),
                                                                 std_cxx11::cref(dof_to_boundary_mapping),
@@ -1230,7 +1264,7 @@ namespace MatrixCreator
   namespace
   {
 
-    template <int dim, int spacedim>
+    template <int dim, int spacedim, typename number>
     void
     create_hp_boundary_mass_matrix_1 (typename hp::DoFHandler<dim,spacedim>::active_cell_iterator const
                                       &cell,
@@ -1240,8 +1274,8 @@ namespace MatrixCreator
                                       hp::MappingCollection<dim,spacedim> const &mapping,
                                       hp::FECollection<dim,spacedim> const &fe_collection,
                                       hp::QCollection<dim-1> const &q,
-                                      const typename FunctionMap<spacedim>::type &boundary_functions,
-                                      Function<spacedim> const *const coefficient,
+                                      const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                                      Function<spacedim,number> const *const coefficient,
                                       std::vector<unsigned int> const &component_mapping)
     {
       const unsigned int n_components  = fe_collection.n_components();
@@ -1264,11 +1298,11 @@ namespace MatrixCreator
       // two variables for the coefficient,
       // one for the two cases indicated in
       // the name
-      std::vector<double>          coefficient_values;
-      std::vector<Vector<double> > coefficient_vector_values;
+      std::vector<number>          coefficient_values;
+      std::vector<Vector<number> > coefficient_vector_values;
 
-      std::vector<double>          rhs_values_scalar;
-      std::vector<Vector<double> > rhs_values_system;
+      std::vector<number>          rhs_values_scalar;
+      std::vector<Vector<number> > rhs_values_system;
 
       std::vector<types::global_dof_index> dofs_on_face_vector (dofs_per_face);
 
@@ -1301,7 +1335,7 @@ namespace MatrixCreator
               // FE has several components
               {
                 rhs_values_system.resize (fe_values.n_quadrature_points,
-                                          Vector<double>(n_function_components));
+                                          Vector<number>(n_function_components));
                 boundary_functions.find(cell->face(face)->boundary_id())
                 ->second->vector_value_list (fe_values.get_quadrature_points(),
                                              rhs_values_system);
@@ -1337,7 +1371,7 @@ namespace MatrixCreator
                     else
                       {
                         coefficient_vector_values.resize (fe_values.n_quadrature_points,
-                                                          Vector<double>(n_components));
+                                                          Vector<number>(n_components));
                         coefficient->vector_value_list (fe_values.get_quadrature_points(),
                                                         coefficient_vector_values);
                         for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
@@ -1446,13 +1480,13 @@ namespace MatrixCreator
 
 
 
-    template <int dim,int spacedim>
+    template <int dim, int spacedim, typename number>
     void copy_hp_boundary_mass_matrix_1(MatrixCreator::internal::AssemblerBoundary
                                         ::CopyData<hp::DoFHandler<dim,spacedim> > const &copy_data,
-                                        typename FunctionMap<spacedim>::type const &boundary_functions,
+                                        std::map<types::boundary_id, const Function<spacedim,number>*> const &boundary_functions,
                                         std::vector<types::global_dof_index> const &dof_to_boundary_mapping,
-                                        SparseMatrix<double> &matrix,
-                                        Vector<double> &rhs_vector)
+                                        SparseMatrix<number> &matrix,
+                                        Vector<number> &rhs_vector)
     {
       // now transfer cell matrix and vector to the whole boundary matrix
       //
@@ -1556,14 +1590,14 @@ namespace MatrixCreator
 
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_boundary_mass_matrix (const DoFHandler<dim,spacedim>     &dof,
                                     const Quadrature<dim-1>   &q,
-                                    SparseMatrix<double>      &matrix,
-                                    const typename FunctionMap<spacedim>::type &rhs,
-                                    Vector<double>            &rhs_vector,
+                                    SparseMatrix<number>      &matrix,
+                                    const std::map<types::boundary_id, const Function<spacedim,number>*> &rhs,
+                                    Vector<number>            &rhs_vector,
                                     std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                                    const Function<spacedim> *const a,
+                                    const Function<spacedim,number> *const a,
                                     std::vector<unsigned int> component_mapping)
   {
     create_boundary_mass_matrix(StaticMappingQ1<dim,spacedim>::mapping, dof, q,
@@ -1572,16 +1606,16 @@ namespace MatrixCreator
 
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void
   create_boundary_mass_matrix (const hp::MappingCollection<dim,spacedim>        &mapping,
                                const hp::DoFHandler<dim,spacedim>     &dof,
                                const hp::QCollection<dim-1>   &q,
-                               SparseMatrix<double>      &matrix,
-                               const typename FunctionMap<spacedim>::type         &boundary_functions,
-                               Vector<double>            &rhs_vector,
+                               SparseMatrix<number>      &matrix,
+                               const std::map<types::boundary_id, const Function<spacedim,number>*> &boundary_functions,
+                               Vector<number>            &rhs_vector,
                                std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                               const Function<spacedim> *const coefficient,
+                               const Function<spacedim,number> *const coefficient,
                                std::vector<unsigned int> component_mapping)
   {
     // what would that be in 1d? the
@@ -1596,7 +1630,7 @@ namespace MatrixCreator
     const hp::FECollection<dim,spacedim> &fe_collection = dof.get_fe();
     const unsigned int n_components  = fe_collection.n_components();
 
-    Assert (matrix.n() == dof.n_boundary_dofs(boundary_functions),
+    Assert (matrix.n() == dof.n_boundary_dofs (boundary_functions),
             ExcInternalError());
     Assert (matrix.n() == matrix.m(), ExcInternalError());
     Assert (matrix.n() == rhs_vector.size(), ExcInternalError());
@@ -1623,14 +1657,14 @@ namespace MatrixCreator
                     static_cast<std_cxx11::function<void (typename hp::DoFHandler<dim,spacedim>::active_cell_iterator
                                                           const &,MatrixCreator::internal::AssemblerBoundary::Scratch const &,
                                                           MatrixCreator::internal::AssemblerBoundary::CopyData<hp::DoFHandler<dim,spacedim> > &)> >
-                    (std_cxx11::bind( &create_hp_boundary_mass_matrix_1<dim,spacedim>,std_cxx11::_1,std_cxx11::_2,
+                    (std_cxx11::bind( &create_hp_boundary_mass_matrix_1<dim,spacedim,number>,std_cxx11::_1,std_cxx11::_2,
                                       std_cxx11::_3,
                                       std_cxx11::cref(mapping),std_cxx11::cref(fe_collection),std_cxx11::cref(q),
                                       std_cxx11::cref(boundary_functions),coefficient,
                                       std_cxx11::cref(component_mapping))),
                     static_cast<std_cxx11::function<void (MatrixCreator::internal::AssemblerBoundary
                                                           ::CopyData<hp::DoFHandler<dim,spacedim> > const &)> > (
-                      std_cxx11::bind( &copy_hp_boundary_mass_matrix_1<dim,spacedim>,
+                      std_cxx11::bind( &copy_hp_boundary_mass_matrix_1<dim,spacedim,number>,
                                        std_cxx11::_1,
                                        std_cxx11::cref(boundary_functions),
                                        std_cxx11::cref(dof_to_boundary_mapping),
@@ -1643,14 +1677,14 @@ namespace MatrixCreator
 
 
 
-  template <int dim, int spacedim>
+  template <int dim, int spacedim, typename number>
   void create_boundary_mass_matrix (const hp::DoFHandler<dim,spacedim>     &dof,
                                     const hp::QCollection<dim-1>   &q,
-                                    SparseMatrix<double>      &matrix,
-                                    const typename FunctionMap<spacedim>::type &rhs,
-                                    Vector<double>            &rhs_vector,
+                                    SparseMatrix<number>      &matrix,
+                                    const std::map<types::boundary_id, const Function<spacedim,number>*> &rhs,
+                                    Vector<number>            &rhs_vector,
                                     std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-                                    const Function<spacedim> *const a,
+                                    const Function<spacedim,number> *const a,
                                     std::vector<unsigned int> component_mapping)
   {
     create_boundary_mass_matrix(hp::StaticMappingQ1<dim,spacedim>::mapping_collection, dof, q,
@@ -1675,7 +1709,7 @@ namespace MatrixCreator
     hp::FECollection<dim,spacedim>      fe_collection (dof.get_fe());
     hp::QCollection<dim>                q_collection (q);
     hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,double>
     assembler_data (fe_collection,
                     update_gradients  | update_JxW_values |
                     (coefficient != 0 ? update_quadrature_points : UpdateFlags(0)),
@@ -1733,7 +1767,7 @@ namespace MatrixCreator
     hp::FECollection<dim,spacedim>      fe_collection (dof.get_fe());
     hp::QCollection<dim>                q_collection (q);
     hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,double>
     assembler_data (fe_collection,
                     update_gradients  | update_values |
                     update_JxW_values | update_quadrature_points,
@@ -1788,7 +1822,7 @@ namespace MatrixCreator
     Assert (matrix.n() == dof.n_dofs(),
             ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
 
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,double>
     assembler_data (dof.get_fe(),
                     update_gradients  | update_JxW_values |
                     (coefficient != 0 ? update_quadrature_points : UpdateFlags(0)),
@@ -1843,7 +1877,7 @@ namespace MatrixCreator
     Assert (matrix.n() == dof.n_dofs(),
             ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
 
-    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim>
+    MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,double>
     assembler_data (dof.get_fe(),
                     update_gradients  | update_values |
                     update_JxW_values | update_quadrature_points,
@@ -1901,7 +1935,7 @@ namespace MatrixTools
 //TODO:[WB] I don't think that the optimized storage of diagonals is needed (GK)
   template <typename number>
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,number> &boundary_values,
                          SparseMatrix<number>  &matrix,
                          Vector<number>   &solution,
                          Vector<number>   &right_hand_side,
@@ -1937,8 +1971,8 @@ namespace MatrixTools
         }
 
 
-    std::map<types::global_dof_index,double>::const_iterator dof  = boundary_values.begin(),
-                                                             endd = boundary_values.end();
+    typename std::map<types::global_dof_index,number>::const_iterator dof  = boundary_values.begin(),
+                                                                      endd = boundary_values.end();
     for (; dof != endd; ++dof)
       {
         Assert (dof->first < n_dofs, ExcInternalError());
@@ -2059,7 +2093,7 @@ namespace MatrixTools
 
   template <typename number>
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,number> &boundary_values,
                          BlockSparseMatrix<number>  &matrix,
                          BlockVector<number>   &solution,
                          BlockVector<number>   &right_hand_side,
@@ -2119,8 +2153,8 @@ namespace MatrixTools
       first_nonzero_diagonal_entry = 1;
 
 
-    std::map<types::global_dof_index,double>::const_iterator dof  = boundary_values.begin(),
-                                                             endd = boundary_values.end();
+    typename std::map<types::global_dof_index,number>::const_iterator dof  = boundary_values.begin(),
+                                                                      endd = boundary_values.end();
     const BlockSparsityPattern &
     sparsity_pattern = matrix.get_sparsity_pattern();
 
@@ -2324,7 +2358,7 @@ namespace MatrixTools
     {
       template <typename PETScMatrix, typename PETScVector>
       void
-      apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+      apply_boundary_values (const std::map<types::global_dof_index,PetscScalar> &boundary_values,
                              PETScMatrix      &matrix,
                              PETScVector      &solution,
                              PETScVector      &right_hand_side,
@@ -2425,7 +2459,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,PetscScalar> &boundary_values,
                          PETScWrappers::SparseMatrix   &matrix,
                          PETScWrappers::Vector   &solution,
                          PETScWrappers::Vector   &right_hand_side,
@@ -2440,7 +2474,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,PetscScalar> &boundary_values,
                          PETScWrappers::MPI::SparseMatrix   &matrix,
                          PETScWrappers::MPI::Vector   &solution,
                          PETScWrappers::MPI::Vector   &right_hand_side,
@@ -2454,7 +2488,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,PetscScalar>  &boundary_values,
                          PETScWrappers::MPI::BlockSparseMatrix &matrix,
                          PETScWrappers::MPI::BlockVector        &solution,
                          PETScWrappers::MPI::BlockVector        &right_hand_side,
@@ -2473,11 +2507,11 @@ namespace MatrixTools
     // into blocks for the boundary values.
     // To this end, generate a vector of
     // maps with the respective indices.
-    std::vector<std::map<dealii::types::global_dof_index,double> > block_boundary_values(n_blocks);
+    std::vector<std::map<dealii::types::global_dof_index,PetscScalar> > block_boundary_values(n_blocks);
     {
       int block = 0;
       dealii::types::global_dof_index offset = 0;
-      for (std::map<types::global_dof_index,double>::const_iterator
+      for (std::map<types::global_dof_index,PetscScalar>::const_iterator
            dof  = boundary_values.begin();
            dof != boundary_values.end();
            ++dof)
@@ -2512,7 +2546,7 @@ namespace MatrixTools
           = matrix.block(block_m,0).local_range();
 
         std::vector<types::global_dof_index> constrained_rows;
-        for (std::map<types::global_dof_index,double>::const_iterator
+        for (std::map<types::global_dof_index,PetscScalar>::const_iterator
              dof  = block_boundary_values[block_m].begin();
              dof != block_boundary_values[block_m].end();
              ++dof)
@@ -2538,7 +2572,7 @@ namespace MatrixTools
     {
       template <typename TrilinosMatrix, typename TrilinosVector>
       void
-      apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+      apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                              TrilinosMatrix      &matrix,
                              TrilinosVector      &solution,
                              TrilinosVector      &right_hand_side,
@@ -2579,7 +2613,7 @@ namespace MatrixTools
             // figure out which rows of the matrix we
             // have to eliminate on this processor
             std::vector<types::global_dof_index> constrained_rows;
-            for (std::map<types::global_dof_index,double>::const_iterator
+            for (std::map<types::global_dof_index,TrilinosScalar>::const_iterator
                  dof  = boundary_values.begin();
                  dof != boundary_values.end();
                  ++dof)
@@ -2598,7 +2632,7 @@ namespace MatrixTools
 
             std::vector<types::global_dof_index> indices;
             std::vector<TrilinosScalar>  solution_values;
-            for (std::map<types::global_dof_index,double>::const_iterator
+            for (std::map<types::global_dof_index,TrilinosScalar>::const_iterator
                  dof  = boundary_values.begin();
                  dof != boundary_values.end();
                  ++dof)
@@ -2635,7 +2669,7 @@ namespace MatrixTools
 
       template <typename TrilinosMatrix, typename TrilinosBlockVector>
       void
-      apply_block_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+      apply_block_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                                    TrilinosMatrix      &matrix,
                                    TrilinosBlockVector &solution,
                                    TrilinosBlockVector &right_hand_side,
@@ -2656,11 +2690,11 @@ namespace MatrixTools
         // into blocks for the boundary values.
         // To this end, generate a vector of
         // maps with the respective indices.
-        std::vector<std::map<types::global_dof_index,double> > block_boundary_values(n_blocks);
+        std::vector<std::map<types::global_dof_index,TrilinosScalar> > block_boundary_values(n_blocks);
         {
           int block=0;
           types::global_dof_index offset = 0;
-          for (std::map<types::global_dof_index,double>::const_iterator
+          for (std::map<types::global_dof_index,TrilinosScalar>::const_iterator
                dof  = boundary_values.begin();
                dof != boundary_values.end();
                ++dof)
@@ -2672,7 +2706,7 @@ namespace MatrixTools
                 }
               const types::global_dof_index index = dof->first - offset;
               block_boundary_values[block].insert(
-                std::pair<types::global_dof_index, double> (index,dof->second));
+                std::pair<types::global_dof_index, TrilinosScalar> (index,dof->second));
             }
         }
 
@@ -2696,7 +2730,7 @@ namespace MatrixTools
               = matrix.block(block_m,0).local_range();
 
             std::vector<types::global_dof_index> constrained_rows;
-            for (std::map<types::global_dof_index,double>::const_iterator
+            for (std::map<types::global_dof_index,TrilinosScalar>::const_iterator
                  dof  = block_boundary_values[block_m].begin();
                  dof != block_boundary_values[block_m].end();
                  ++dof)
@@ -2716,7 +2750,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                          TrilinosWrappers::SparseMatrix   &matrix,
                          TrilinosWrappers::Vector         &solution,
                          TrilinosWrappers::Vector         &right_hand_side,
@@ -2731,7 +2765,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar> &boundary_values,
                          TrilinosWrappers::SparseMatrix   &matrix,
                          TrilinosWrappers::MPI::Vector    &solution,
                          TrilinosWrappers::MPI::Vector    &right_hand_side,
@@ -2746,7 +2780,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar>  &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix &matrix,
                          TrilinosWrappers::BlockVector        &solution,
                          TrilinosWrappers::BlockVector        &right_hand_side,
@@ -2760,7 +2794,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,TrilinosScalar>  &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix &matrix,
                          TrilinosWrappers::MPI::BlockVector   &solution,
                          TrilinosWrappers::MPI::BlockVector   &right_hand_side,
@@ -2774,12 +2808,12 @@ namespace MatrixTools
 #endif
 
 
-
+  template <typename number>
   void
-  local_apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+  local_apply_boundary_values (const std::map<types::global_dof_index,number> &boundary_values,
                                const std::vector<types::global_dof_index> &local_dof_indices,
-                               FullMatrix<double> &local_matrix,
-                               Vector<double>     &local_rhs,
+                               FullMatrix<number> &local_matrix,
+                               Vector<number>     &local_rhs,
                                const bool          eliminate_columns)
   {
     Assert (local_dof_indices.size() == local_matrix.m(),
@@ -2820,11 +2854,11 @@ namespace MatrixTools
     //
     // we only compute this value lazily the
     // first time we need it.
-    double average_diagonal = 0;
+    number average_diagonal = 0;
     const unsigned int n_local_dofs = local_dof_indices.size();
     for (unsigned int i=0; i<n_local_dofs; ++i)
       {
-        const std::map<types::global_dof_index, double>::const_iterator
+        const typename std::map<types::global_dof_index, number>::const_iterator
         boundary_value = boundary_values.find (local_dof_indices[i]);
         if (boundary_value != boundary_values.end())
           {
@@ -2903,14 +2937,31 @@ namespace MatrixTools
                                  Vector<double>   &solution,
                                  Vector<double>   &right_hand_side,
                                  const bool        eliminate_columns);
+
+  template
+  void
+  apply_boundary_values<long double> (const std::map<types::global_dof_index,long double> &boundary_values,
+                                      SparseMatrix<long double>  &matrix,
+                                      Vector<long double>   &solution,
+                                      Vector<long double>   &right_hand_side,
+                                      const bool        eliminate_columns);
+
   template
   void
-  apply_boundary_values<float> (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values<float> (const std::map<types::global_dof_index,float> &boundary_values,
                                 SparseMatrix<float>  &matrix,
                                 Vector<float>   &solution,
                                 Vector<float>   &right_hand_side,
                                 const bool        eliminate_columns);
 
+  template
+  void
+  apply_boundary_values<long double> (const std::map<types::global_dof_index,long double> &boundary_values,
+                                      BlockSparseMatrix<long double>  &matrix,
+                                      BlockVector<long double>   &solution,
+                                      BlockVector<long double>   &right_hand_side,
+                                      const bool        eliminate_columns);
+
   template
   void
   apply_boundary_values<double> (const std::map<types::global_dof_index,double> &boundary_values,
@@ -2920,7 +2971,7 @@ namespace MatrixTools
                                  const bool        eliminate_columns);
   template
   void
-  apply_boundary_values<float> (const std::map<types::global_dof_index,double> &boundary_values,
+  apply_boundary_values<float> (const std::map<types::global_dof_index,float> &boundary_values,
                                 BlockSparseMatrix<float>  &matrix,
                                 BlockVector<float>   &solution,
                                 BlockVector<float>   &right_hand_side,
index a2e9346dc5bed08b1300eb1bfadd57afb3d9c9c2..8787c146307f8c8c025a8a24db117b2b4032bd2c 100644 (file)
 //
 // ---------------------------------------------------------------------
 
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
+for (number: REAL_SCALARS)
   {
-#if deal_II_dimension <= deal_II_space_dimension
+    template
+      void MatrixTools::local_apply_boundary_values
+      (const std::map<types::global_dof_index,number> &boundary_values,
+       const std::vector<types::global_dof_index> &local_dof_indices,
+       FullMatrix<number> &local_matrix,
+       Vector<number>     &local_rhs,
+       const bool          eliminate_columns);
 
-// non-hp version of create_mass_matrix
+  }
+
+for (scalar: REAL_SCALARS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
+  {
+#if deal_II_dimension <= deal_II_space_dimension
+    // non-hp version of create_mass_matrix
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,double,deal_II_space_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const Mapping<deal_II_dimension,deal_II_space_dimension>       &mapping,
        const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,double,deal_II_space_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,double,deal_II_space_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const Mapping<deal_II_dimension,deal_II_space_dimension>       &mapping,
        const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<double>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar>      &rhs,
+       Vector<scalar>           &rhs_vector,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,double,deal_II_space_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<double>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar>      &rhs,
+       Vector<scalar>           &rhs_vector,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
+#endif
+  }
 
 
+for (scalar: REAL_SCALARS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
+  {
+#if deal_II_dimension <= deal_II_space_dimension
     template
-      void MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension>
+      void MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const DoFHandler<deal_II_dimension,deal_II_space_dimension>     &dof,
        const Quadrature<deal_II_dimension-1>   &q,
-       SparseMatrix<double>      &matrix,
-       const FunctionMap<deal_II_space_dimension>::type &rhs,
-       Vector<double>            &rhs_vector,
+       SparseMatrix<scalar>      &matrix,
+       const std::map<types::boundary_id, const Function<deal_II_space_dimension,scalar>*> &rhs,
+       Vector<scalar>            &rhs_vector,
        std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-       const Function<deal_II_space_dimension> * const a,
+       const Function<deal_II_space_dimension,scalar> * const a,
        std::vector<unsigned int>);
 
     template
-      void MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension>
+      void MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension, scalar>
       (const Mapping<deal_II_dimension,deal_II_space_dimension> &,
        const DoFHandler<deal_II_dimension,deal_II_space_dimension>     &dof,
        const Quadrature<deal_II_dimension-1>   &q,
-       SparseMatrix<double>      &matrix,
-       const FunctionMap<deal_II_space_dimension>::type &rhs,
-       Vector<double>            &rhs_vector,
+       SparseMatrix<scalar>      &matrix,
+       const std::map<types::boundary_id, const Function<deal_II_space_dimension,scalar>*> &rhs,
+       Vector<scalar>            &rhs_vector,
        std::vector<types::global_dof_index> &dof_to_boundary_mapping,
-       const Function<deal_II_space_dimension> * const a,
+       const Function<deal_II_space_dimension,scalar> * const a,
        std::vector<unsigned int>);
 
     template
       void
-      MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension>
+      MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const hp::MappingCollection<deal_II_dimension,deal_II_space_dimension>&,
        const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>&,
        const hp::QCollection<deal_II_dimension-1>&,
-       SparseMatrix<double>&,
-       const FunctionMap<deal_II_space_dimension>::type&,
-       Vector<double>&,
+       SparseMatrix<scalar>&,
+       const std::map<types::boundary_id, const Function<deal_II_space_dimension,scalar>*>&,
+       Vector<scalar>&,
        std::vector<types::global_dof_index>&,
-       const Function<deal_II_space_dimension> * const,
+       const Function<deal_II_space_dimension,scalar> * const,
        std::vector<unsigned int>);
 
     template
-      void MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension>
+      void MatrixCreator::create_boundary_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>&,
        const hp::QCollection<deal_II_dimension-1>&,
-       SparseMatrix<double>&,
-       const FunctionMap<deal_II_space_dimension>::type&,
-       Vector<double>&,
+       SparseMatrix<scalar>&,
+       const std::map<types::boundary_id, const Function<deal_II_space_dimension,scalar>*>&,
+       Vector<scalar>&,
        std::vector<types::global_dof_index>&,
-       const Function<deal_II_space_dimension> * const,
+       const Function<deal_II_space_dimension,scalar> * const,
        std::vector<unsigned int>);
-
-// same for float
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,float,deal_II_space_dimension>
-      (const Mapping<deal_II_dimension,deal_II_space_dimension>       &mapping,
-       const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,float,deal_II_space_dimension>
-      (const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,float,deal_II_space_dimension>
-      (const Mapping<deal_II_dimension,deal_II_space_dimension>       &mapping,
-       const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<float>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,float,deal_II_space_dimension>
-      (const DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const Quadrature<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<float>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-
 #endif
   }
 
 
 //TODO[SP]: replace <deal_II_dimension> by <deal_II_dimension, deal_II_space_dimension>
 // where applicable and move to codimension cases above also when applicable
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
+for (scalar : REAL_SCALARS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
   {
 // hp versions of functions
 #if deal_II_dimension <= deal_II_space_dimension
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,double,deal_II_space_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const hp::MappingCollection<deal_II_dimension,deal_II_space_dimension>       &mapping,
        const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
 
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,double,deal_II_space_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension,deal_II_space_dimension,scalar>
       (const hp::MappingCollection<deal_II_dimension,deal_II_space_dimension>       &mapping,
        const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<double>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar>      &rhs,
+       Vector<scalar>           &rhs_vector,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
 
-
 #endif
 
 #if deal_II_dimension == deal_II_space_dimension
 
        
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>
       (const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
 
     template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension>
+      void MatrixCreator::create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>
       (const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
        const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<double>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<double>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
+       SparseMatrix<scalar>     &matrix,
+       const Function<deal_II_space_dimension,scalar>      &rhs,
+       Vector<scalar>           &rhs_vector,
+       const Function<deal_II_space_dimension,scalar> * const coefficient,
        const ConstraintMatrix   &constraints);
 
+#endif
+  }
+
+
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
+  {
+#if deal_II_dimension == deal_II_space_dimension
+
 // non-hp versions of create_laplace_matrix
     template
       void MatrixCreator::create_laplace_matrix<deal_II_dimension>
@@ -264,55 +250,5 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS
        const ConstraintMatrix   &constraints);
 
 #endif
-
-// same for float
-#if deal_II_dimension <= deal_II_space_dimension
-
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,float,deal_II_space_dimension>
-      (const hp::MappingCollection<deal_II_dimension,deal_II_space_dimension>       &mapping,
-       const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension,float,deal_II_space_dimension>
-      (const hp::MappingCollection<deal_II_dimension,deal_II_space_dimension>       &mapping,
-       const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<float>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-
-
-#endif
-
-#if deal_II_dimension == deal_II_space_dimension
-
-       
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension>
-      (const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-
-    template
-      void MatrixCreator::create_mass_matrix<deal_II_dimension>
-      (const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>    &dof,
-       const hp::QCollection<deal_II_dimension>    &q,
-       SparseMatrix<float>     &matrix,
-       const Function<deal_II_space_dimension>      &rhs,
-       Vector<float>           &rhs_vector,
-       const Function<deal_II_space_dimension> * const coefficient,
-       const ConstraintMatrix   &constraints);
-
-#endif
-
   }
 
index c23601adaec081b5e88234a42fe2d2b8d65b902c..b5fef1b0e531b716e151020eddcf3d93ec78067c 100644 (file)
@@ -22,7 +22,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
         void interpolate_boundary_values
         (const Mapping<deal_II_dimension,deal_II_space_dimension>    &,
          const DH<deal_II_dimension,deal_II_space_dimension> &,
-         const FunctionMap<deal_II_space_dimension>::type &,
+         const std::map<types::boundary_id, const Function<deal_II_space_dimension,double>*> &,
          std::map<types::global_dof_index,double>       &,
          const ComponentMask    &);
 
@@ -46,7 +46,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
       template
         void interpolate_boundary_values
         (const DH<deal_II_dimension,deal_II_space_dimension> &,
-         const FunctionMap<deal_II_space_dimension>::type &,
+         const std::map<types::boundary_id, const Function<deal_II_space_dimension,double>*> &,
          std::map<types::global_dof_index,double>       &,
          const ComponentMask    &);
 
@@ -54,7 +54,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
         void interpolate_boundary_values (
           const Mapping<deal_II_dimension,deal_II_space_dimension>    &,
           const DH<deal_II_dimension,deal_II_space_dimension> &,
-          const FunctionMap<deal_II_space_dimension>::type   &,
+          const std::map<types::boundary_id, const Function<deal_II_space_dimension,double>*> &,
           ConstraintMatrix                    &,
           const ComponentMask    &);
 
@@ -78,7 +78,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS;
       template
         void interpolate_boundary_values (
           const DH<deal_II_dimension,deal_II_space_dimension> &,
-          const FunctionMap<deal_II_space_dimension>::type   &,
+          const std::map<types::boundary_id, const Function<deal_II_space_dimension,double>*> &,
           ConstraintMatrix                    &,
           const ComponentMask    &);
         \}
@@ -94,14 +94,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
         void project_boundary_values<deal_II_dimension>
         (const Mapping<deal_II_dimension>     &,
          const DoFHandler<deal_II_dimension>  &,
-         const FunctionMap<deal_II_dimension>::type &,
+         const std::map<types::boundary_id, const Function<deal_II_dimension,double>*> &,
          const Quadrature<deal_II_dimension-1>&,
          std::map<types::global_dof_index,double>&, std::vector<unsigned int>);
 
       template
         void project_boundary_values<deal_II_dimension>
         (const DoFHandler<deal_II_dimension>  &,
-         const FunctionMap<deal_II_dimension>::type &,
+         const std::map<types::boundary_id, const Function<deal_II_dimension,double>*> &,
          const Quadrature<deal_II_dimension-1>&,
          std::map<types::global_dof_index,double>&, 
          std::vector<unsigned int>);
@@ -110,14 +110,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
         void project_boundary_values<deal_II_dimension>
         (const Mapping<deal_II_dimension>     &,
          const DoFHandler<deal_II_dimension>  &,
-         const FunctionMap<deal_II_dimension>::type &,
+         const std::map<types::boundary_id, const Function<deal_II_dimension,double>*> &,
          const Quadrature<deal_II_dimension-1>&,
          ConstraintMatrix&, std::vector<unsigned int>);
 
       template
         void project_boundary_values<deal_II_dimension>
         (const DoFHandler<deal_II_dimension>  &,
-         const FunctionMap<deal_II_dimension>::type &,
+         const std::map<types::boundary_id, const Function<deal_II_dimension,double>*> &,
          const Quadrature<deal_II_dimension-1>&,
          ConstraintMatrix&, 
          std::vector<unsigned int>);
@@ -125,7 +125,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
       template
         void project_boundary_values<deal_II_dimension,deal_II_space_dimension>
         (const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension> &,
-         const FunctionMap<deal_II_space_dimension>::type &,
+         const std::map<types::boundary_id, const Function<deal_II_dimension,double>*> &,
          const hp::QCollection<deal_II_dimension-1> &,
          std::map<types::global_dof_index,double> &,
          std::vector<unsigned int>);
index 2afeedbb2ecc92515a4c7b1e36c7cd3867df403c..ffbdda0908d12b6e557dbfd8cb195d97d97178ff 100644 (file)
@@ -25,7 +25,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens
          const DoFHandler<deal_II_dimension,deal_II_space_dimension>   &,
          const ConstraintMatrix                &,
          const Quadrature<deal_II_dimension>   &,
-         const Function<deal_II_space_dimension>     &,
+         const Function<deal_II_space_dimension,VEC::value_type>     &,
          VEC                                   &,
          const bool,
          const Quadrature<deal_II_dimension-1> &,
@@ -36,7 +36,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens
         (const DoFHandler<deal_II_dimension,deal_II_space_dimension>   &,
          const ConstraintMatrix                &,
          const Quadrature<deal_II_dimension>   &,
-         const Function<deal_II_space_dimension>     &,
+         const Function<deal_II_space_dimension,VEC::value_type>     &,
          VEC                                   &,
          const bool,
          const Quadrature<deal_II_dimension-1> &,
@@ -48,7 +48,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens
          const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>   &,
          const ConstraintMatrix                &,
          const hp::QCollection<deal_II_dimension>   &,
-         const Function<deal_II_space_dimension>     &,
+         const Function<deal_II_space_dimension,VEC::value_type>     &,
          VEC                                   &,
          const bool,
          const hp::QCollection<deal_II_dimension-1> &,
@@ -59,7 +59,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens
         (const hp::DoFHandler<deal_II_dimension,deal_II_space_dimension>   &,
          const ConstraintMatrix                &,
          const hp::QCollection<deal_II_dimension>   &,
-         const Function<deal_II_space_dimension>     &,
+         const Function<deal_II_space_dimension,VEC::value_type>     &,
          VEC                                   &,
          const bool,
          const hp::QCollection<deal_II_dimension-1> &,

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.