quadrature
gripyth.elements.quadrature
Quadrature (numerical integration) of the elements.
MODULE | DESCRIPTION |
---|---|
shape_functions |
Shape function (N) and its derivative (dN). |
CLASS | DESCRIPTION |
---|---|
Quadrature |
Describes the quadrature method of the finite elements. |
FUNCTION | DESCRIPTION |
---|---|
gaussian |
Returns Gauss points and integration weights for Gaussian quadrature. |
gaussian_1d |
Returns Gauss points and weights for 1d Gaussian quadrature. |
quadrature |
Computes quadrature points and weights for given element type. |
simplex |
Returns Gauss points and weights for simplex elements. |
simplex_2d |
Returns Gauss points and weights for 2d simplex elements. |
simplex_3d |
Returns Gauss points and weights for 2d simplex elements. |
Quadrature
dataclass
Describes the quadrature method of the finite elements.
METHOD | DESCRIPTION |
---|---|
__init__ |
Generates quadrature points for given element types. |
ATTRIBUTE | DESCRIPTION |
---|---|
N |
shape functions
TYPE:
|
N_tract |
shape functions of tractions
TYPE:
|
boundary_type |
boundary element type
TYPE:
|
dN |
derivatives of shape functions
TYPE:
|
dN_tract |
shape-function derivatives of tractions
TYPE:
|
element_type |
bulk element type
TYPE:
|
gauss_points |
Gauss points
TYPE:
|
gauss_points_tract |
Gauss points of tractions
TYPE:
|
gauss_weights |
Gauss weights
TYPE:
|
gauss_weights_tract |
Gauss weights of tractions
TYPE:
|
n_gauss_points |
number of Gauss points
TYPE:
|
order |
quadrature order
TYPE:
|
dN_tract
instance-attribute
shape-function derivatives of tractions
gauss_points_tract
instance-attribute
Gauss points of tractions
gauss_weights_tract
instance-attribute
Gauss weights of tractions
__init__
__init__(
dim: int = 2,
element_type: ElementType = ElementType.QUAD4,
boundary_type: ElementType = ElementType.LINE2,
order: int = 2,
)
Generates quadrature points for given element types.
Input:
dim
: geometric dimension of the elementselement_type
: bulk element typeboundary_type
: boundary element typeorder
: quadrature order
Returns an object with various attributes describing the quadrature (numerical integration) and shape function of the finite elements.
gaussian
Returns Gauss points and integration weights for Gaussian quadrature.
Input:
order
: desired order of quadraturedim
: spatial dimension of the problem
Output:
points
: matrix containing the coordinates of the Gauss pointsweights
: vector with the numerical integration weights
gaussian_1d
Returns Gauss points and weights for 1d Gaussian quadrature.
Input:
order
: desired order of quadrature
Output:
points
: vector containing the 1d coordinates of the Gauss pointsweights
: vector containing the 1d numerical integration weights
quadrature
quadrature(
element_type: ElementType = ElementType.QUAD4,
order: int = 2,
dim: int = 2,
) -> tuple[NDArray[float64], NDArray[float64]]
Computes quadrature points and weights for given element type.
Input:
element_type
: type of finite elementorder
: desired order of quadraturedim
: spatial dimension of the problem
Output:
points
: matrix containing the coordinates of the Gauss points (parametric space)weights
: vector with the numerical integration weights
simplex
Returns Gauss points and weights for simplex elements.
simplex_2d
Returns Gauss points and weights for 2d simplex elements.