This file is indexed.

/usr/include/dune/functions/common/defaultderivativetraits.hh is in libdune-functions-dev 2.5.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_FUNCTIONS_COMMON_DEFAULT_DERIVATIVE_TRAITS_HH
#define DUNE_FUNCTIONS_COMMON_DEFAULT_DERIVATIVE_TRAITS_HH

#include <type_traits>
#include <utility>

#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>

namespace Dune {
namespace Functions {



/**
 * \brief Dummy range class to be used if no proper type is available
 *
 * \ingroup FunctionUtility
 */
class InvalidRange
{};


/**
 * \brief Default implementation for derivative traits
 *
 * \ingroup FunctionUtility
 *
 * This class provides sensible defaults for the range
 * of derivatives of functions with some common \p Domain
 * and \p Range types.
 */
template<class Signature>
struct DefaultDerivativeTraits
{
  //! Range of derivative for function with given signature
  typedef InvalidRange Range;
};


/**
 * \brief Default implementation for derivative traits
 *
 * \ingroup FunctionUtility
 *
 * Specialization for Signature = double(double)
 */
template<>
struct DefaultDerivativeTraits< double(double) >
{
  //! \copydoc DefaultDerivativeTraits::Range
  typedef double Range;
};

/**
 * \brief Default implementation for derivative traits
 *
 * \ingroup FunctionUtility
 *
 * \tparam K Scalar range type
 *
 * Specialization for Signature = K(FieldVector<K,n>)
 */
template<typename K, int n>
struct DefaultDerivativeTraits<K(FieldVector<K,n>)>
{
  //! \copydoc DefaultDerivativeTraits::Range
  typedef FieldVector<K,n> Range;
};

/**
 * \brief Default implementation for derivative traits
 *
 * \ingroup FunctionUtility
 *
 * \tparam K Scalar range type
 *
 * Specialization for Signature = FieldVector<K,m>(FieldVector<K,n>)
 */
template<typename K, int n, int m>
struct DefaultDerivativeTraits<FieldVector<K,m>(FieldVector<K,n>)>
{
  //! \copydoc DefaultDerivativeTraits::Range
  typedef FieldMatrix<K,m,n> Range;
};

/**
 * \brief Default implementation for derivative traits
 *
 * \ingroup FunctionUtility
 *
 * \tparam K Scalar range type
 *
 * Specialization for Signature = FieldMatrix<K,1,m>(FieldVector<K,n>)
 */
template<typename K, int n, int m>
struct DefaultDerivativeTraits<FieldMatrix<K,1,m>(FieldVector<K,n>)>
{
  //! \copydoc DefaultDerivativeTraits::Range
  typedef FieldMatrix<K,m,n> Range;
};


}} // namespace Dune::Functions


#endif // DUNE_FUNCTIONS_COMMON_DEFAULT_DERIVATIVE_TRAITS_HH