sfepy.discrete.fem.extmods.bases module
Polynomial base functions and related utilities.
-
sfepy.discrete.fem.extmods.bases.eval_lagrange_simplex()
Evaluate Lagrange base polynomials in given points on simplex domain.
Parameters: | coors : array
The coordinates of the points, shape (n_coor, dim).
mtx_i : array
The inverse of simplex coordinates matrix, shape (dim + 1, dim + 1).
nodes : array
The description of finite element nodes, shape (n_nod, dim + 1).
order : int
diff : bool
If True, return base function derivatives.
eps : float
The tolerance for snapping out-of-simplex point back to the simplex.
check_errors : bool
If True, raise ValueError if a barycentric coordinate is outside
the snap interval [-eps, 1 + eps].
|
Returns: | out : array
The evaluated base functions, shape (n_coor, 1 or dim, n_nod).
|
-
sfepy.discrete.fem.extmods.bases.eval_lagrange_tensor_product()
Evaluate Lagrange base polynomials in given points on tensor product
domain.
Parameters: | coors : array
The coordinates of the points, shape (n_coor, dim).
mtx_i : array
The inverse of 1D simplex coordinates matrix, shape (2, 2).
nodes : array
The description of finite element nodes, shape (n_nod, 2 * dim).
order : int
diff : bool
If True, return base function derivatives.
eps : float
The tolerance for snapping out-of-simplex point back to the simplex.
check_errors : bool
If True, raise ValueError if a barycentric coordinate is outside
the snap interval [-eps, 1 + eps].
|
Returns: | out : array
The evaluated base functions, shape (n_coor, 1 or dim, n_nod).
|
-
sfepy.discrete.fem.extmods.bases.evaluate_in_rc()
Evaluate source field DOF values in the given reference element
coordinates using the given interpolation.
- Evaluate base functions in the reference coordinates.
- Interpolate source values using the base functions.
Interpolation uses field approximation connectivity.
-
sfepy.discrete.fem.extmods.bases.find_ref_coors()
Find reference element coordinates corresponding to physical
coordinates coors.
This function works only with a geometry mesh (order 1
connectivity), not a field mesh! The polynomial space arguments have
to correspond to that.
Returns: | ref_coors : array
The reference coordinates.
cells : array
The array of (ig, iel) corresponding to the reference coordinates.
status : array
The status array: 0 is success, 1 means the point is
extrapolated within close_limit, 2 extrapolated outside
close_limit and 3 extrapolated with no extrapolation allowed.
|
-
sfepy.discrete.fem.extmods.bases.get_barycentric_coors()
Get barycentric (area in 2D, volume in 3D) coordinates of points.
Parameters: | coors : array
The coordinates of the points, shape (n_coor, dim).
mtx_i : array
The inverse of simplex coordinates matrix, shape (dim + 1, dim + 1).
eps : float
The tolerance for snapping out-of-simplex point back to the simplex.
check_errors : bool
If True, raise ValueError if a barycentric coordinate is outside
the snap interval [-eps, 1 + eps].
|
Returns: | bc : array
The barycentric coordinates, shape (n_coor, dim + 1). Then
reference element coordinates xi = dot(bc, ref_coors).
|