bipolyval


Untitled

Bipolynomial evaluation

Syntax

F = bipolyval(P,X)

Description

F = bipolyval(P,X), returns the value(s) of the bivariate polynomial P evaluated at X, where X is an N by 2 array, i.e., X = [ x1 y1; x2 y2; … xN yN]. Analogous to MATLAB® polynomial form, a bipolynomial of the form
is stored in a matrix as follows
See the examples below.

Examples

Example Construction and evaluation of a (tensor-product) biquadratic polynomial
Consider the biquadratic polynomial defined by
which is one of the shape functions used to define the standard nine-node quadrilateral finite element over the element domain .
This shape function can be represented in bipoly form directly as
that is,
P = [ 1 0 -1; 0 0 0; -1 0 1 ];
Note that in this particular case, the bipolynomial can be written as the product of two polynomials, one in terms of x and one in terms of y, that is,
where
In turn, the polynomials and are themselves defined as the product of two linear polynomials, which can be defined in MATLAB® polynomial form as
p = conv([1 -1],[1 1]);
q = conv([1 -1],[1 1]);
With these two polynomials in MATLAB® form, the bipolynomial form can then be obtained by performing the matrix multiplication
P = q’*p
P = 3×3
1 0 -1
0 0 0
-1 0 1
This is sometimes referred to as taking the outer (or tensor) product of the vectors. Note that for any bipolynomial that can be written as the product of two polynomials like this, its MATLAB® polynomial form can be computed in this manner. In finite elements, this type of function is referred to as a tensor-product shape function.
This particular shape function has the property that it is equal to 1 at the centroid of the element (called the center node) and 0 along the boundary, making it a so-called “bubble function.”
It can be easily verified that this bipolynomial satisfies these conditions by computing its value at the center node using the bipolyval function
F = bipolyval(P,[0 0])
F = 1
While, for example, at any boundary point, say the vertices and , it has the value
F = bipolyval(P,[1 1;-1 -1; 1 -1;-1 1])’
F = 1×4
0 0 0 0
The “bubbly-ness” of this function can be oserved in Example 1 for the bipoly2sym function documentation.
It is interesting to note that a tensor-product bipolynomial can always be evaluated at a point by simply taking the product of the evaluations of the univariate polynomials from which it was constructed, e.g.,
polyval(p,0)*polyval(q,0)
ans = 1
which is equal to what was obtained above using the bipolyval function. Of course, not all bipolynomials can be constructed, and thus evaluated, in this simple manner.

This function is part of……..