sfepy.fem.integrals module¶
-
class
sfepy.fem.integrals.Integral(name, kind='v', order=1, coors=None, weights=None)[source]¶ Wrapper class around quadratures.
-
get_key()[source]¶ Get the key string corresponding to the integral kind and order, that can be used to distinguish various cached data evaluated using the integral.
-
get_qp(geometry)[source]¶ Get quadrature point coordinates and corresponding weights for given geometry. For built-in quadratures, the integration order is given by self.order.
Parameters: geometry : str
The geometry key describing the integration domain, see the keys of sfepy.fem.quadratures.quadrature_tables.
Returns: coors : array
The coordinates of quadrature points.
weights: array
The quadrature weights.
-
integrate(function, order=1, geometry='1_2')[source]¶ Integrate numerically a given scalar function.
Parameters: function : callable(coors)
The function of space coordinates to integrate.
order : int, optional
The integration order. For tensor product geometries, this is the 1D (line) order.
geometry : str
The geometry key describing the integration domain. Default is ‘1_2’, i.e. a line integral in [0, 1]. For other values see the keys of sfepy.fem.quadratures.quadrature_tables.
Returns: val : float
The value of the integral.
-

