/usr/include/deal.II/base/polynomials_p.h is in libdeal.ii-dev 6.3.1-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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | //---------------------------------------------------------------------------
// $Id: polynomials_p.h 20162 2009-11-25 04:24:45Z kanschat $
// Version: $Name$
//
// Copyright (C) 2004, 2005, 2006, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// to the file deal.II/doc/license.html for the text and
// further information on this license.
//
//---------------------------------------------------------------------------
#ifndef __deal2__polynomials_P_h
#define __deal2__polynomials_P_h
#include <base/config.h>
#include <base/exceptions.h>
#include <base/tensor.h>
#include <base/point.h>
#include <base/polynomial.h>
#include <base/polynomial_space.h>
#include <base/table.h>
#include <vector>
DEAL_II_NAMESPACE_OPEN
/**
* @addtogroup Polynomials
* @{
*/
/**
* This class implements the polynomial space of degree <tt>p</tt>
* based on the monomials ${1,x,x^2,...}$. I.e. in <tt>d</tt>
* dimensions it constructs all polynomials of the form $\prod_{i=1}^d
* x_i^{n_i}$, where $\sum_i n_i\leq p$. The base polynomials are
* given a specific ordering, e.g. in 2 dimensions:
* ${1,x,y,xy,x^2,y^2,x^2y,xy^2,x^3,y^3,...}$. The ordering of the
* monomials in $P_k1$ matches the ordering of the monomials in $P_k2$
* for $k2>k1$.
*
* @author Ralf Hartmann, 2004
*/
template <int dim>
class PolynomialsP: public PolynomialSpace<dim>
{
public:
/**
* Access to the dimension of
* this object, for checking and
* automatic setting of dimension
* in other classes.
*/
static const unsigned int dimension = dim;
/**
* Constructor. Creates all basis
* functions of $P_p$.
* @arg p: the degree of the
* polynomial space
*/
PolynomialsP (const unsigned int p);
/**
* Returns the degree <tt>p</tt>
* of the polynomial space
* <tt>P_p</tt>.
*
* Note, that this number is
* <tt>PolynomialSpace::degree()-1</tt>,
* compare definition in
* PolynomialSpace.
*/
unsigned int degree() const;
/**
* For the <tt>n</tt>th
* polynomial $p_n(x,y,z)=x^i y^j
* z^k$ this function gives the
* degrees i,j,k in the x,y,z
* directions.
*/
void directional_degrees(unsigned int n,
unsigned int (°rees)[dim]) const;
private:
/**
* Fills the <tt>index_map</tt>.
*/
void create_polynomial_ordering(std::vector<unsigned int> &index_map) const;
/**
* Degree <tt>p</tt> of the
* polynomial space $P_p$,
* i.e. the number <tt>p</tt>
* which was given to the
* constructor.
*/
const unsigned int p;
};
/** @} */
template <int dim>
inline unsigned int
PolynomialsP<dim>::degree() const
{
return p;
}
template <int dim>
inline void
PolynomialsP<dim>::directional_degrees(unsigned int n,
unsigned int (°rees)[dim]) const
{
this->compute_index(n,degrees);
}
DEAL_II_NAMESPACE_CLOSE
#endif
|