Gridap.Polynomials

Gridap.Polynomials.MonomialBasisType
struct MonomialBasis{D,T} <: AbstractVector{Monomial}

Type representing a basis of multivariate scalar-valued, vector-valued, or tensor-valued, iso- or aniso-tropic monomials. The fields of this struct are not public. This type fully implements the Field interface, with up to second order derivatives.

source
Gridap.Polynomials.MonomialBasisMethod
MonomialBasis{D}(::Type{T}, order::Int [, filter::Function]) where {D,T}

Returns an instance of MonomialBasis representing a multivariate polynomial basis in D dimensions, of polynomial degree order, whose value is represented by the type T. The type T is typically <:Number, e.g., Float64 for scalar-valued functions and VectorValue{D,Float64} for vector-valued ones.

Filter function

The filter function is used to select which terms of the tensor product space of order order in D dimensions are to be used. If the filter is not provided, the full tensor-product space is used by default leading to a multivariate polynomial space of type Q. The signature of the filter function is

(e,order) -> Bool

where e is a tuple of D integers containing the exponents of a multivariate monomial. The following filters are used to select well known polynomial spaces

  • Q space: (e,order) -> true
  • P space: (e,order) -> sum(e) <= order
  • "Serendipity" space: (e,order) -> sum( [ i for i in e if i>1 ] ) <= order
source
Gridap.Polynomials.MonomialBasisMethod
MonomialBasis{D}(::Type{T}, orders::Tuple [, filter::Function]) where {D,T}

This version of the constructor allows to pass a tuple orders containing the polynomial order to be used in each of the D dimensions in order to construct an anisotropic tensor-product space.

source
Gridap.Polynomials.PCurlGradMonomialBasisType

struct PCurlGradMonomialBasis{...} <: AbstractArray{Monomial}

This type implements a multivariate vector-valued polynomial basis spanning the space needed for Raviart-Thomas reference elements on simplices. The type parameters and fields of this struct are not public. This type fully implements the Field interface, with up to first order derivatives.

source
Gridap.Polynomials.PCurlGradMonomialBasisMethod

PCurlGradMonomialBasis{D}(::Type{T},order::Int) where {D,T}

Returns a PCurlGradMonomialBasis object. D is the dimension of the coordinate space and T is the type of the components in the vector-value. The order argument has the following meaning: the divergence of the functions in this basis is in the P space of degree order.

source
Gridap.Polynomials.QCurlGradMonomialBasisType
struct QCurlGradMonomialBasis{...} <: AbstractArray{Monomial}

This type implements a multivariate vector-valued polynomial basis spanning the space needed for Raviart-Thomas reference elements on n-cubes. The type parameters and fields of this struct are not public. This type fully implements the Field interface, with up to first order derivatives.

source
Gridap.Polynomials.QCurlGradMonomialBasisMethod
QCurlGradMonomialBasis{D}(::Type{T},order::Int) where {D,T}

Returns a QCurlGradMonomialBasis object. D is the dimension of the coordinate space and T is the type of the components in the vector-value. The order argument has the following meaning: the divergence of the functions in this basis is in the Q space of degree order.

source
Gridap.Polynomials.QGradMonomialBasisType
struct QGradMonomialBasis{...} <: AbstractVector{Monomial}

This type implements a multivariate vector-valued polynomial basis spanning the space needed for Nedelec reference elements on n-cubes. The type parameters and fields of this struct are not public. This type fully implements the Field interface, with up to first order derivatives.

source
Gridap.Polynomials.QGradMonomialBasisMethod
QGradMonomialBasis{D}(::Type{T},order::Int) where {D,T}

Returns a QGradMonomialBasis object. D is the dimension of the coordinate space and T is the type of the components in the vector-value. The order argument has the following meaning: the curl of the functions in this basis is in the Q space of degree order.

source
Gridap.Polynomials.get_exponentsMethod
get_exponents(b::MonomialBasis)

Get a vector of tuples with the exponents of all the terms in the monomial basis.

Examples

using Gridap.Polynomials

b = MonomialBasis{2}(Float64,2)

exponents = get_exponents(b)

println(exponents)

# output
Tuple{Int,Int}[(0, 0), (1, 0), (2, 0), (0, 1), (1, 1), (2, 1), (0, 2), (1, 2), (2, 2)]
source