sfepy.mesh.splinebox module¶
- class sfepy.mesh.splinebox.SplineBox(bbox, coors, nsg=None, field=None)[source]¶
B-spline geometry parametrization. The geometry can be modified by moving spline control points.
- evaluate(cp_values=None, outside=True)[source]¶
Evaluate the new position of the mesh coordinates.
- Parameters:
- cp_valuesarray
The actual control point values. If None, use self.control_values.
- outsidebool
If True, return also the coordinates outside the spline box.
- Returns:
- new_coorsarray
The new position of the mesh coordinates.
- evaluate_derivative(cpoint, dirvec)[source]¶
Evaluate derivative of the spline in a given control point and direction.
- Parameters:
- cpointint, list
The position (index or grid indicies) of the spline control point.
- dirvecarray
The directional vector.
- Returns:
- diffarray
The derivative field.
- get_box_matrix()[source]¶
- Returns:
- mtx2D array
The matrix containing the coefficients of b-spline basis functions.
- get_control_points(init=False)[source]¶
Get the spline control points coordinates.
- Returns:
- cpt_coorsarray
The coordinates of the spline control points.
- initbool
If True, return the initial state.
- move_control_point(cpoint, val)[source]¶
Change shape of spline parametrization.
- Parameters:
- cpointint, list
The position (index or grid indicies) of the spline control point.
- valarray
Displacement.
- class sfepy.mesh.splinebox.SplineRegion2D(spl_bnd, coors, rho=1000.0)[source]¶
B-spline geometry parametrization. The boundary of the SplineRegion2D is defined by BSpline curves.
- static create_spb(spl_bnd, coors, rho=10)[source]¶
Initialize SplineBox knots, control points, base functions, …