// ---------------------------------------------------------------------
//
// Copyright (C) 2010 - 2017 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 (deal_II_dimension : DIMENSIONS ; VEC : REAL_VECTOR_TYPES ; DH : DOFHANDLER_TEMPLATES)
{
    namespace DerivativeApproximation
    \{
    template
    void
    approximate_gradient<deal_II_dimension>
    (const Mapping<deal_II_dimension> &mapping,
     const DH<deal_II_dimension> &dof_handler,
     const VEC             &solution,
     Vector<float>         &derivative_norm,
     const unsigned int     component);

    template
    void
    approximate_gradient<deal_II_dimension>
    (const DH<deal_II_dimension> &dof_handler,
     const VEC             &solution,
     Vector<float>         &derivative_norm,
     const unsigned int     component);

    template
    void
    approximate_second_derivative<deal_II_dimension>
    (const Mapping<deal_II_dimension> &mapping,
     const DH<deal_II_dimension> &dof_handler,
     const VEC             &solution,
     Vector<float>         &derivative_norm,
     const unsigned int     component);

    template
    void
    approximate_second_derivative<deal_II_dimension>
    (const DH<deal_II_dimension> &dof_handler,
     const VEC             &solution,
     Vector<float>         &derivative_norm,
     const unsigned int     component);

    template
    void
    approximate_derivative_tensor < DH <deal_II_dimension>, VEC, 1 >
    (const Mapping<deal_II_dimension> &mapping,
     const DH <deal_II_dimension> &dof_handler,
     const VEC &solution,
     const DH <deal_II_dimension>::active_cell_iterator &cell,
     Tensor<1,deal_II_dimension> &derivative,
     const unsigned int     component);

    template
    void
    approximate_derivative_tensor < DH <deal_II_dimension>, VEC, 2 >
    (const Mapping <deal_II_dimension> &mapping,
     const DH <deal_II_dimension> &dof_handler,
     const VEC &solution,
     const DH <deal_II_dimension>::active_cell_iterator &cell,
     Tensor<2,deal_II_dimension> &derivative,
     const unsigned int     component);

    template
    void
    approximate_derivative_tensor < DH <deal_II_dimension>, VEC, 3 >
    (const Mapping <deal_II_dimension> &mapping,
     const DH <deal_II_dimension> &dof_handler,
     const VEC &solution,
     const DH <deal_II_dimension>::active_cell_iterator &cell,
     Tensor<3,deal_II_dimension> &derivative,
     const unsigned int     component);


    template
    void
    approximate_derivative_tensor < DH <deal_II_dimension>, VEC, 1 >
    (const DH <deal_II_dimension> &dof_handler,
     const VEC &solution,
     const DH <deal_II_dimension>::active_cell_iterator &cell,
     Tensor<1,deal_II_dimension> &derivative,
     const unsigned int     component);

    template
    void
    approximate_derivative_tensor < DH <deal_II_dimension>, VEC, 2 >
    (const DH <deal_II_dimension> &dof_handler,
     const VEC &solution,
     const DH <deal_II_dimension>::active_cell_iterator &cell,
     Tensor<2,deal_II_dimension> &derivative,
     const unsigned int     component);

    template
    void
    approximate_derivative_tensor < DH <deal_II_dimension>, VEC, 3 >
    (const DH <deal_II_dimension> &dof_handler,
     const VEC &solution,
     const DH <deal_II_dimension>::active_cell_iterator &cell,
     Tensor<3,deal_II_dimension> &derivative,
     const unsigned int     component);

    \}
}


for (deal_II_dimension : DIMENSIONS)
{
    namespace DerivativeApproximation
    \{
    template
    double
    derivative_norm(const Tensor<1,deal_II_dimension> &derivative);

    template
    double
    derivative_norm(const Tensor<2,deal_II_dimension> &derivative);

    template
    double
    derivative_norm(const Tensor<3,deal_II_dimension> &derivative);
    \}
}
