Reference documentation for deal.II version 9.0.0
Public Member Functions | List of all members
TensorProductPolynomialsBubbles< dim > Class Template Reference

#include <deal.II/base/tensor_product_polynomials_bubbles.h>

Inheritance diagram for TensorProductPolynomialsBubbles< dim >:
[legend]

Public Member Functions

template<class Pol >
 TensorProductPolynomialsBubbles (const std::vector< Pol > &pols)
 
void compute (const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads, std::vector< Tensor< 3, dim > > &third_derivatives, std::vector< Tensor< 4, dim > > &fourth_derivatives) const
 
double compute_value (const unsigned int i, const Point< dim > &p) const
 
template<int order>
Tensor< order, dim > compute_derivative (const unsigned int i, const Point< dim > &p) const
 
Tensor< 1, dim > compute_grad (const unsigned int i, const Point< dim > &p) const
 
Tensor< 2, dim > compute_grad_grad (const unsigned int i, const Point< dim > &p) const
 
unsigned int n () const
 
- Public Member Functions inherited from TensorProductPolynomials< dim >
 TensorProductPolynomials (const std::vector< Pol > &pols)
 
void output_indices (std::ostream &out) const
 
void set_numbering (const std::vector< unsigned int > &renumber)
 
const std::vector< unsigned int > & get_numbering () const
 
const std::vector< unsigned int > & get_numbering_inverse () const
 
void compute (const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads, std::vector< Tensor< 3, dim > > &third_derivatives, std::vector< Tensor< 4, dim > > &fourth_derivatives) const
 
double compute_value (const unsigned int i, const Point< dim > &p) const
 
Tensor< order, dim > compute_derivative (const unsigned int i, const Point< dim > &p) const
 
Tensor< 1, dim > compute_grad (const unsigned int i, const Point< dim > &p) const
 
Tensor< 2, dim > compute_grad_grad (const unsigned int i, const Point< dim > &p) const
 
unsigned int n () const
 

Additional Inherited Members

- Static Public Attributes inherited from TensorProductPolynomials< dim >
static const unsigned int dimension
 
- Protected Member Functions inherited from TensorProductPolynomials< dim >
void compute_index (const unsigned int i, unsigned int(&indices)[(dim >0?dim:1)]) const
 
- Protected Attributes inherited from TensorProductPolynomials< dim >
std::vector< Polynomials::Polynomial< double > > polynomials
 
unsigned int n_tensor_pols
 
std::vector< unsigned int > index_map
 
std::vector< unsigned int > index_map_inverse
 

Detailed Description

template<int dim>
class TensorProductPolynomialsBubbles< dim >

Tensor product of given polynomials and bubble functions of form \((2*x_j-1)^{degree-1}\prod_{i=0}^{dim-1}(x_i(1-x_i))\). This class inherits most of its functionality from TensorProductPolynomials. The bubble enrichments are added for the last indices. index.

Author
Daniel Arndt, 2015

Definition at line 47 of file tensor_product_polynomials_bubbles.h.

Constructor & Destructor Documentation

◆ TensorProductPolynomialsBubbles()

template<int dim>
template<class Pol >
TensorProductPolynomialsBubbles< dim >::TensorProductPolynomialsBubbles ( const std::vector< Pol > &  pols)

Constructor. pols is a vector of objects that should be derived or otherwise convertible to one-dimensional polynomial objects. It will be copied element by element into a private variable.

Member Function Documentation

◆ compute()

template<int dim>
void TensorProductPolynomialsBubbles< dim >::compute ( const Point< dim > &  unit_point,
std::vector< double > &  values,
std::vector< Tensor< 1, dim > > &  grads,
std::vector< Tensor< 2, dim > > &  grad_grads,
std::vector< Tensor< 3, dim > > &  third_derivatives,
std::vector< Tensor< 4, dim > > &  fourth_derivatives 
) const

Compute the value and the first and second derivatives of each tensor product polynomial at unit_point.

The size of the vectors must either be equal 0 or equal n(). In the first case, the function will not compute these values.

If you need values or derivatives of all tensor product polynomials then use this function, rather than using any of the compute_value(), compute_grad() or compute_grad_grad() functions, see below, in a loop over all tensor product polynomials.

Definition at line 220 of file tensor_product_polynomials_bubbles.cc.

◆ compute_value()

template<int dim>
double TensorProductPolynomialsBubbles< dim >::compute_value ( const unsigned int  i,
const Point< dim > &  p 
) const

Compute the value of the ith tensor product polynomial at unit_point. Here i is given in tensor product numbering.

Note, that using this function within a loop over all tensor product polynomials is not efficient, because then each point value of the underlying (one-dimensional) polynomials is (unnecessarily) computed several times. Instead use the compute() function with values.size()==n() to get the point values of all tensor polynomials all at once and in a much more efficient way.

Definition at line 30 of file tensor_product_polynomials_bubbles.cc.

◆ compute_derivative()

template<int dim>
template<int order>
Tensor<order,dim> TensorProductPolynomialsBubbles< dim >::compute_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const

Compute the order order derivative of the ith tensor product polynomial at unit_point. Here i is given in tensor product numbering.

Note, that using this function within a loop over all tensor product polynomials is not efficient, because then each derivative value of the underlying (one-dimensional) polynomials is (unnecessarily) computed several times. Instead use the compute() function, see above, with the size of the appropriate parameter set to n() to get the point value of all tensor polynomials all at once and in a much more efficient way.

◆ compute_grad()

template<int dim>
Tensor< 1, dim > TensorProductPolynomialsBubbles< dim >::compute_grad ( const unsigned int  i,
const Point< dim > &  p 
) const

Compute the grad of the ith tensor product polynomial at unit_point. Here i is given in tensor product numbering.

Note, that using this function within a loop over all tensor product polynomials is not efficient, because then each derivative value of the underlying (one-dimensional) polynomials is (unnecessarily) computed several times. Instead use the compute() function, see above, with grads.size()==n() to get the point value of all tensor polynomials all at once and in a much more efficient way.

Definition at line 69 of file tensor_product_polynomials_bubbles.cc.

◆ compute_grad_grad()

template<int dim>
Tensor< 2, dim > TensorProductPolynomialsBubbles< dim >::compute_grad_grad ( const unsigned int  i,
const Point< dim > &  p 
) const

Compute the second derivative (grad_grad) of the ith tensor product polynomial at unit_point. Here i is given in tensor product numbering.

Note, that using this function within a loop over all tensor product polynomials is not efficient, because then each derivative value of the underlying (one-dimensional) polynomials is (unnecessarily) computed several times. Instead use the compute() function, see above, with grad_grads.size()==n() to get the point value of all tensor polynomials all at once and in a much more efficient way.

Definition at line 116 of file tensor_product_polynomials_bubbles.cc.

◆ n()

template<int dim>
unsigned int TensorProductPolynomialsBubbles< dim >::n ( ) const

Return the number of tensor product polynomials plus the bubble enrichments. For n 1d polynomials this is ndim+1 if the maximum degree of the polynomials is one and ndim+dim otherwise.


The documentation for this class was generated from the following files: