// ---------------------------------------------------------------------
//
// Copyright (C) 2018 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.
//
// ---------------------------------------------------------------------


for (dim0 : DIMENSIONS; dim1 :DIMENSIONS; spacedim :  SPACE_DIMENSIONS;
        Sparsity : SPARSITY_PATTERNS)
{
#if dim1 <= dim0 && dim0 <= spacedim
    template
    void create_coupling_sparsity_pattern(const DoFHandler<dim0, spacedim> &space_dh,
            const DoFHandler<dim1, spacedim> &immersed_dh,
            const Quadrature<dim1>           &quad,
            Sparsity                         &sparsity,
            const ConstraintMatrix           &constraints,
            const ComponentMask              &space_comps,
            const ComponentMask              &immersed_comps,
            const Mapping<dim0, spacedim>    &space_mapping,
            const Mapping<dim1, spacedim>    &immersed_mapping);

    template
    void create_coupling_sparsity_pattern(const GridTools::Cache<dim0,spacedim> &cache,
            const DoFHandler<dim0, spacedim> &space_dh,
            const DoFHandler<dim1, spacedim> &immersed_dh,
            const Quadrature<dim1>           &quad,
            Sparsity                         &sparsity,
            const ConstraintMatrix           &constraints,
            const ComponentMask              &space_comps,
            const ComponentMask              &immersed_comps,
            const Mapping<dim1, spacedim>    &immersed_mapping);
#endif
}


for (dim0 : DIMENSIONS; dim1 :DIMENSIONS; spacedim : SPACE_DIMENSIONS;
        Matrix : SPARSE_MATRICES)
{
#if dim1 <= dim0 && dim0 <= spacedim
    template
    void create_coupling_mass_matrix(const DoFHandler<dim0, spacedim> &space_dh,
                                     const DoFHandler<dim1, spacedim> &immersed_dh,
                                     const Quadrature<dim1>           &quad,
                                     Matrix                           &matrix,
                                     const ConstraintMatrix           &constraints,
                                     const ComponentMask              &space_comps,
                                     const ComponentMask              &immersed_comps,
                                     const Mapping<dim0, spacedim>    &space_mapping,
                                     const Mapping<dim1, spacedim>    &immersed_mapping);

    template
    void create_coupling_mass_matrix(const GridTools::Cache<dim0,spacedim> &cache,
                                     const DoFHandler<dim0, spacedim> &space_dh,
                                     const DoFHandler<dim1, spacedim> &immersed_dh,
                                     const Quadrature<dim1>           &quad,
                                     Matrix                           &matrix,
                                     const ConstraintMatrix           &constraints,
                                     const ComponentMask              &space_comps,
                                     const ComponentMask              &immersed_comps,
                                     const Mapping<dim1, spacedim>    &immersed_mapping);
#endif
}
