# sfepy.discrete.common.poly_spaces module¶

class `sfepy.discrete.common.poly_spaces.``PolySpace`(name, geometry, order)[source]

Abstract polynomial space class.

static `any_from_args`(name, geometry, order, base='lagrange', force_bubble=False)[source]

Construct a particular polynomial space classes according to the arguments passed in.

`eval_base`(self, coors, diff=0, ori=None, force_axis=False, transform=None, suppress_errors=False, eps=1e-15)[source]

Evaluate the basis or its first or second derivatives in points given by coordinates. The real work is done in _eval_base() implemented in subclasses.

Note that the second derivative code is a work-in-progress and only coors and transform arguments are used.

Parameters
coorsarray_like

The coordinates of points where the basis is evaluated. See Notes.

diff0, 1 or 2

If nonzero, return the given derivative.

oriarray_like, optional

Optional orientation of element facets for per element basis.

force_axisbool

If True, force the resulting array shape to have one more axis even when ori is None.

transformarray_like, optional

The basis transform array.

suppress_errorsbool

If True, do not report points outside the reference domain.

epsfloat

Accuracy for comparing coordinates.

Returns
basearray

The basis (shape (n_coor, 1, n_base)) or its first derivative (shape (n_coor, dim, n_base)) or its second derivative (shape (n_coor, dim, dim, n_base)) evaluated in the given points. An additional axis is pre-pended of length n_cell, if ori is given, or of length 1, if force_axis is True.

Notes

If coors.ndim == 3, several point sets are assumed, with equal number of points in each of them. This is the case, for example, of the values of the volume base functions on the element facets. The indexing (of bf_b(g)) is then (ifa,iqp,:,n_ep), so that the facet can be set in C using FMF_SetCell.

`keys` = {(0, 1): 'simplex', (1, 2): 'simplex', (2, 3): 'simplex', (2, 4): 'tensor_product', (3, 4): 'simplex', (3, 8): 'tensor_product'}
static `suggest_name`(geometry, order, base='lagrange', force_bubble=False)[source]

Suggest the polynomial space name given its constructor parameters.

`sfepy.discrete.common.poly_spaces.``transform_basis`(transform, bf)[source]

Transform a basis bf using transform array of matrices.