lsdo_genie.bsplines

Submodules

Package Contents

Classes

BsplineCurve

BsplineSurface

Base class for B-spline Surfaces

BsplineVolume

Functions

open_uniform_knot_vector(num_cps, order)

Generates an open uniform knot vector

standard_uniform_knot_vector(num_cps, order)

Generates a standard uniform knot vector

class lsdo_genie.bsplines.BsplineCurve(name, order_u, knots_u, shape)

Base class for B-spline Curves

Attributes:
namestr

A nickname for the B-spline Curve

order_uint

B-spline polynomial order in the ‘u’ direction

knots_uint

Knot vector in the ‘u’ direction

shapetuple

Shape for the B-spline control points (num_u,)

get_basis_matrix(u_vec, du)

Builds the basis matrix for a given set of points

Parameters:
u_vecnp.ndarray(N,)

Vector storing the ‘u’ cooridinates of a set of input points

duint

Derivative in the ‘u’ direction

Returns:
basissps.csc_matrix(N,Ncp)

The basis matrix that can be multiplied with the control points to get (N,) output values

class lsdo_genie.bsplines.BsplineSurface(name, order_u, order_v, knots_u, knots_v, shape)

Base class for B-spline Surfaces

Attributes:
namestr

A nickname for the B-spline Surface

order_uint

B-spline polynomial order in the ‘u’ direction

knots_uint

Knot vector in the ‘u’ direction

order_vint

B-spline polynomial order in the ‘v’ direction

knots_vint

Knot vector in the ‘v’ direction

shapetuple

Shape for the B-spline control points (num_u,num_v,)

get_basis_matrix(u_vec, v_vec, du, dv)

Builds the basis matrix for a given set of points

Parameters:
u_vecnp.ndarray(N,)

Vector storing the ‘u’ cooridinates of a set of input points

duint

Derivative in the ‘u’ direction

v_vecnp.ndarray(N,)

Vector storing the ‘v’ cooridinates of a set of input points

dvint

Derivative in the ‘v’ direction

Returns:
basissps.csc_matrix(N,Ncp)

The basis matrix that can be multiplied with the control points to get (N,) output values

class lsdo_genie.bsplines.BsplineVolume(name, order_u, order_v, order_w, knots_u, knots_v, knots_w, shape)

Base class for B-spline Curves

Attributes:
namestr

A nickname for the B-spline Curve

order_uint

B-spline polynomial order in the ‘u’ direction

knots_uint

Knot vector in the ‘u’ direction

order_vint

B-spline polynomial order in the ‘v’ direction

knots_vint

Knot vector in the ‘v’ direction

order_wint

B-spline polynomial order in the ‘w’ direction

knots_wint

Knot vector in the ‘w’ direction

shapetuple

Shape for the B-spline control points (num_u,)

get_basis_matrix(u_vec, v_vec, w_vec, du, dv, dw)

Builds the basis matrix for a given set of points

Parameters:
u_vecnp.ndarray(N,)

Vector storing the ‘u’ cooridinates of a set of input points

duint

Derivative in the ‘u’ direction

v_vecnp.ndarray(N,)

Vector storing the ‘v’ cooridinates of a set of input points

dvint

Derivative in the ‘v’ direction

w_vecnp.ndarray(N,)

Vector storing the ‘w’ cooridinates of a set of input points

dwint

Derivative in the ‘w’ direction

Returns:
basissps.csc_matrix(N,Ncp)

The basis matrix that can be multiplied with the control points to get (N,) output values

lsdo_genie.bsplines.open_uniform_knot_vector(num_cps: int, order: int)

Generates an open uniform knot vector

Parameters:
num_cpsint

Number of control points

orderint

B-spline polynomial order

Returns:
knot_vectornp.ndarray(num_cps+order,)

The open uniform knot vector for unit parametric coordinates

lsdo_genie.bsplines.standard_uniform_knot_vector(num_cps: int, order: int)

Generates a standard uniform knot vector

Parameters:
num_cpsint

Number of control points

orderint

B-spline polynomial order

Returns:
knot_vectornp.ndarray(num_cps+order,)

The standard uniform knot vector for unit parametric coordinates