// ---------------------------------------------------------------------
//
// Copyright (C) 1998 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
// The deal.II library is free software; you can use it, redistribute
// it, and/or modify it under the terms of the GNU Lesser General
// Public License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// The full text of the license can be found in the file LICENSE at
// the top level of the deal.II distribution.
//
// ---------------------------------------------------------------------


//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)
{
  namespace VectorTools \{

#if deal_II_dimension == deal_II_space_dimension
#if deal_II_dimension != 1
  template
  void
  compute_nonzero_normal_flux_constraints (const DoFHandler<deal_II_dimension> &dof_handler,
                                           const unsigned int     first_vector_component,
                                           const std::set<types::boundary_id> &boundary_ids,
                                           FunctionMap<deal_II_dimension>::type &function_map,
                                           ConstraintMatrix      &constraints,
                                           const Mapping<deal_II_dimension>    &mapping);

  template
  void
  compute_nonzero_normal_flux_constraints (const hp::DoFHandler<deal_II_dimension> &dof_handler,
                                           const unsigned int     first_vector_component,
                                           const std::set<types::boundary_id> &boundary_ids,
                                           FunctionMap<deal_II_dimension>::type &function_map,
                                           ConstraintMatrix      &constraints,
                                           const Mapping<deal_II_dimension>    &mapping);

  template
  void
  compute_nonzero_tangential_flux_constraints (const DoFHandler<deal_II_dimension> &dof_handler,
                                               const unsigned int     first_vector_component,
                                               const std::set<types::boundary_id> &boundary_ids,
                                               FunctionMap<deal_II_dimension>::type &function_map,
                                               ConstraintMatrix      &constraints,
                                               const Mapping<deal_II_dimension>    &mapping);
  template
  void
  compute_nonzero_tangential_flux_constraints (const hp::DoFHandler<deal_II_dimension> &dof_handler,
                                               const unsigned int     first_vector_component,
                                               const std::set<types::boundary_id> &boundary_ids,
                                               FunctionMap<deal_II_dimension>::type &function_map,
                                               ConstraintMatrix      &constraints,
                                               const Mapping<deal_II_dimension>    &mapping);
    
  template
  void
  compute_no_normal_flux_constraints (const DoFHandler<deal_II_dimension> &dof_handler,
                                      const unsigned int     first_vector_component,
                                      const std::set<types::boundary_id> &boundary_ids,
                                      ConstraintMatrix      &constraints,
                                      const Mapping<deal_II_dimension>    &mapping);

  template
  void
  compute_no_normal_flux_constraints (const hp::DoFHandler<deal_II_dimension> &dof_handler,
                                      const unsigned int     first_vector_component,
                                      const std::set<types::boundary_id> &boundary_ids,
                                      ConstraintMatrix      &constraints,
                                      const Mapping<deal_II_dimension>    &mapping);
    
  template
  void
  compute_normal_flux_constraints (const DoFHandler<deal_II_dimension> &dof_handler,
                                   const unsigned int     first_vector_component,
                                   const std::set<types::boundary_id> &boundary_ids,
                                   ConstraintMatrix      &constraints,
                                   const Mapping<deal_II_dimension>    &mapping);

  template
  void
  compute_normal_flux_constraints (const hp::DoFHandler<deal_II_dimension> &dof_handler,
                                   const unsigned int     first_vector_component,
                                   const std::set<types::boundary_id> &boundary_ids,
                                   ConstraintMatrix      &constraints,
                                   const Mapping<deal_II_dimension>    &mapping);
#endif
#endif
  \}
}