Feel++
0.92.0
|
a Set of polynomials More...
#include <polynomialset.hpp>
Classes | |
class | Context |
class | PreCompute |
Public Types | |
typedef PreCompute | precompute_type |
typedef boost::shared_ptr < precompute_type > | precompute_ptrtype |
typedef std::vector< std::map < typename convex_type::permutation_type, precompute_ptrtype > > | faces_precompute_type |
Public Member Functions | |
precompute_ptrtype | preCompute (self_ptrtype p, points_type const &P) |
std::vector< std::map < typename convex_type::permutation_type, precompute_ptrtype > > | preComputeOnFaces (self_ptrtype p, points_type const &P) |
template<size_type context_v, size_type context_g, typename BasisType , typename GeoType , typename ElementType > | |
boost::shared_ptr< Context < context_v, BasisType, GeoType, ElementType > > | context (boost::shared_ptr< BasisType > b, boost::shared_ptr< GeoType > gm, precompute_ptrtype &pc) |
template<int contextv, int contextg, typename BasisType , typename GeoType , typename ElementType > | |
boost::shared_ptr< Context < contextv, BasisType, GeoType, ElementType > > | ctx (boost::shared_ptr< BasisType > const &b, boost::shared_ptr< typename GeoType::template Context< contextg, ElementType > > const &gm, precompute_ptrtype pc, ElementType &e) |
template<int contextv, typename BasisType , typename GeoType , typename ElementType > | |
boost::shared_ptr< Context < contextv, BasisType, GeoType, ElementType > > | ctx (boost::shared_ptr< BasisType > const &b, boost::shared_ptr< typename GeoType::template Context< contextv, ElementType > > const &gm, precompute_ptrtype pc, ElementType &e) |
Constructors, destructor | |
PolynomialSet () | |
PolynomialSet (Poly const &p) | |
PolynomialSet (Poly const &p, matrix_type const &c, bool __as_is=false) | |
PolynomialSet (matrix_type const &c, bool __as_is=false) | |
PolynomialSet (PolynomialSet const &p) | |
virtual | ~PolynomialSet () |
Operator overloads | |
self_type & | operator= (self_type const &pset) |
component_type | operator[] (uint16_type i) const |
extract the i-th component of a vectorial polynomial set | |
Mutators | |
void | setCoefficient (matrix_type const &__c, bool __as_is=false) |
Methods | |
PolynomialSet< Poly, PolySetType > | polynomials (std::vector< uint16_type > const &list_p) const |
PolynomialSet< Poly, PolySetType > | polynomialsUpToDimension (int dim_p) const |
PolynomialSet< Poly, PolySetType > | polynomialsRange (uint16_type dim_bot, uint16_type dim_top) const |
Polynomial< Poly, PolySetType > | polynomial (uint16_type i) const |
template<typename AE > | |
ublas::vector< value_type > | evaluate (uint16_type i, ublas::vector_expression< AE > const &__pt) const |
template<typename AE > | |
ublas::matrix< value_type > | evaluate (ublas::vector_expression< AE > const &__pt) const |
template<typename AE > | |
matrix_type | evaluate (ublas::matrix_expression< AE > const &__pts) const |
matrix_type const & | d (uint16_type i) const |
derivatives of Dubiner polynomials the derivatives are computed at the nodes of the lattice | |
matrix_type | d (uint16_type i, uint16_type j) const |
self_type | derivate (uint16_type l) const |
Derivate with respect to the l-th direction. | |
template<typename AE > | |
ublas::vector< matrix_type > | derivate (ublas::matrix_expression< AE > const &pts) const |
template<typename AE > | |
matrix_type | derivate (uint16_type i, ublas::matrix_expression< AE > const &pts) const |
template<typename AE > | |
matrix_type | derivate (uint16_type i, uint16_type j, ublas::matrix_expression< AE > const &pts) const |
gradient_polynomialset_type | gradient () const |
gradient_polynomialset_type | gradient (mpl::int_< 0 >) const |
gradient_polynomialset_type | gradient (mpl::int_< 1 >) const |
uint16_type | nbDof () const |
void | insert (PolynomialSet< Poly, PolySetType > const &p, bool erase=false) |
Static Public Attributes | |
Constants | |
static const uint16_type | nDim = Poly::nDim |
static const uint16_type | nRealDim = Poly::nRealDim |
static const uint16_type | nOrder = Poly::nOrder |
Typedefs | |
typedef PolynomialSet< Poly, PolySetType > | self_type |
typedef boost::shared_ptr < self_type > | self_ptrtype |
typedef Poly::value_type | value_type |
typedef Poly::basis_type | basis_type |
typedef PolySetType< nRealDim > | polyset_type |
typedef PolynomialSet< Poly, Scalar > | component_type |
typedef Polynomial< Poly, PolySetType > | polynomial_type |
typedef polynomial_type | polynomial_view_type |
typedef Poly::convex_type | convex_type |
typedef basis_type::matrix_type | matrix_type |
typedef basis_type::points_type | points_type |
typedef PolynomialSet< Poly, Vectorial > | gradient_polynomialset_type |
static const bool | is_product = Poly::is_product |
static const bool | is_tensor2 = polyset_type::is_tensor2 |
static const bool | is_vectorial = polyset_type::is_vectorial |
static const bool | is_scalar = polyset_type::is_scalar |
static const uint16_type | nComponents = polyset_type::nComponents |
static const uint16_type | nComponents1 = polyset_type::nComponents1 |
static const uint16_type | nComponents2 = polyset_type::nComponents2 |
static const uint16_type | rank = polyset_type::rank |
BOOST_STATIC_ASSERT ((boost::is_same< typename matrix_type::value_type, value_type >::value)) | |
BOOST_STATIC_ASSERT ((boost::is_same< typename matrix_type::value_type, typename points_type::value_type >::value)) | |
Accessors | |
uint16_type | degree () const |
matrix_type const & | coeff () const |
basis_type const & | basis () const |
size_type | polynomialDimension () const |
size_type | polynomialDimensionPerComponent () const |
bool | isZero () const |
virtual std::string | familyName () const |
std::string | name (std::string sep=".") const |
static bool | isScalar () |
static bool | isVectorial () |
static uint16_type | numberOfComponents () |
a Set of polynomials
This class represents a set of polynomials defined in a certain basis given by the template argument. The coefficients of the polynomials in the basis are represented by a matrix whose line represents the polynomials and columns the basis index
where
is the mapping between the polynomial and its coefficients. We have that the polynomial set is represented as follows:
typedef PreCompute Feel::PolynomialSet< Poly, PolySetType >::precompute_type |
class PreCompute
basis_type const& Feel::PolynomialSet< Poly, PolySetType >::basis | ( | ) | const [inline] |
Referenced by Feel::divergence(), Feel::dx(), Feel::dy(), Feel::dz(), and Feel::gradient().
matrix_type const& Feel::PolynomialSet< Poly, PolySetType >::coeff | ( | ) | const [inline] |
Referenced by Feel::curl(), Feel::curlt(), Feel::divergence(), Feel::dx(), Feel::dy(), Feel::dz(), Feel::gradient(), Feel::hessian(), Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::insert(), Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomial(), Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomials(), Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomialsRange(), and Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomialsUpToDimension().
matrix_type const& Feel::PolynomialSet< Poly, PolySetType >::d | ( | uint16_type | i | ) | const [inline] |
derivatives of Dubiner polynomials the derivatives are computed at the nodes of the lattice
Derivate with respect to the coordinates at the nodes where the polynomials basis have been constructed.
We construct the matrix
Referenced by Feel::hessian().
uint16_type Feel::PolynomialSet< Poly, PolySetType >::degree | ( | ) | const [inline] |
self_type Feel::PolynomialSet< Poly, PolySetType >::derivate | ( | uint16_type | l | ) | const [inline] |
Derivate with respect to the l-th direction.
Referenced by Feel::curl(), and Feel::curlt().
ublas::vector<value_type> Feel::PolynomialSet< Poly, PolySetType >::evaluate | ( | uint16_type | i, |
ublas::vector_expression< AE > const & | __pt | ||
) | const [inline] |
evaluate the i-th polynomial at node __pt
ublas::matrix<value_type> Feel::PolynomialSet< Poly, PolySetType >::evaluate | ( | ublas::vector_expression< AE > const & | __pt | ) | const [inline] |
evaluate all polynomials at node __pt
matrix_type Feel::PolynomialSet< Poly, PolySetType >::evaluate | ( | ublas::matrix_expression< AE > const & | __pts | ) | const [inline] |
evaluate all polynomials of the set at a set of nodes
Constructs
virtual std::string Feel::PolynomialSet< Poly, PolySetType >::familyName | ( | ) | const [inline, virtual] |
the familyName()
identifies the finite element
Reimplemented in Feel::OrthogonalPolynomialSet< Dim, Order, PolySetType, T, Hypercube >, and Feel::OrthogonalPolynomialSet< Dim, Order, PolySetType, T, Simplex >.
Referenced by Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::name().
gradient_polynomialset_type Feel::PolynomialSet< Poly, PolySetType >::gradient | ( | ) | const [inline] |
Gradient of the polynomial set
Computes the gradient of the polynomial set.
Referenced by Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::gradient().
void Feel::PolynomialSet< Poly, PolySetType >::insert | ( | PolynomialSet< Poly, PolySetType > const & | p, |
bool | erase = false |
||
) | [inline] |
insert the polynomial set p
at the end of the set
static bool Feel::PolynomialSet< Poly, PolySetType >::isScalar | ( | ) | [inline, static] |
static bool Feel::PolynomialSet< Poly, PolySetType >::isVectorial | ( | ) | [inline, static] |
bool Feel::PolynomialSet< Poly, PolySetType >::isZero | ( | ) | const [inline] |
true
if the polynomial set is zero, false
otherwise std::string Feel::PolynomialSet< Poly, PolySetType >::name | ( | std::string | sep = "." | ) | const [inline] |
the name of a finite element is a string composed by:
sep | separator between family name, dimension and order (by default it is '.') |
uint16_type Feel::PolynomialSet< Poly, PolySetType >::nbDof | ( | ) | const [inline] |
Referenced by Feel::PolynomialSet< Poly, PolySetType >::PreCompute::phi().
component_type Feel::PolynomialSet< Poly, PolySetType >::operator[] | ( | uint16_type | i | ) | const [inline] |
extract the i-th component of a vectorial polynomial set
Polynomial<Poly, PolySetType> Feel::PolynomialSet< Poly, PolySetType >::polynomial | ( | uint16_type | i | ) | const [inline] |
Extract the i
-th polynomial
i | index of the polynomial to extract |
size_type Feel::PolynomialSet< Poly, PolySetType >::polynomialDimension | ( | ) | const [inline] |
Referenced by Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomial(), Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomials(), Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomialsRange(), and Feel::PolynomialSet< Dubiner< Dim, Order, Normalized< false >, T, StorageUBlas >, PolySetType >::polynomialsUpToDimension().
size_type Feel::PolynomialSet< Poly, PolySetType >::polynomialDimensionPerComponent | ( | ) | const [inline] |
PolynomialSet<Poly, PolySetType> Feel::PolynomialSet< Poly, PolySetType >::polynomials | ( | std::vector< uint16_type > const & | list_p | ) | const [inline] |
Extract the polynomials whose indices are listed in list_p
list_p | list of indices of polynomials to extract |
PolynomialSet<Poly, PolySetType> Feel::PolynomialSet< Poly, PolySetType >::polynomialsRange | ( | uint16_type | dim_bot, |
uint16_type | dim_top | ||
) | const [inline] |
Extract the polynomials between dimension dim_bot
up to dimension dim_top
dim_bot | polynomial dimension |
dim_top | polynomial dimension |
PolynomialSet<Poly, PolySetType> Feel::PolynomialSet< Poly, PolySetType >::polynomialsUpToDimension | ( | int | dim_p | ) | const [inline] |
Extract the polynomials up to dimension dim
dim_p | polynomial dimension |
void Feel::PolynomialSet< Poly, PolySetType >::setCoefficient | ( | matrix_type const & | __c, |
bool | __as_is = false |
||
) | [inline] |
set the coefficient of the polynomial set in the basis.