Region#
- class felupe.Region(mesh, element, quadrature, grad=True)[source]#
A numeric region as a combination of a mesh, an element and a numeric integration scheme (quadrature). The gradients of the element shape functions are evaluated at all integration points of each cell in the region if the optional gradient argument is True.
\[ \begin{align}\begin{aligned}\frac{\partial X^I}{\partial r^J} &= X_a^I \frac{\partial h_a}{\partial r^J}\\\frac{\partial h_a}{\partial X^J} &= \frac{\partial h_a}{\partial r^I} \frac{\partial r^I}{\partial X^J}\\dV &= \det\left(\frac{\partial X^I}{\partial r^J}\right) w\end{aligned}\end{align} \]- Parameters
mesh (Mesh) – A mesh with points and cells.
element (Element) – The finite element formulation to be applied on the cells.
quadrature (Quadrature) – An element-compatible numeric integration scheme with points and weights.
grad (bool, optional) – A flag to invoke gradient evaluation (default is True).
- element#
The finite element formulation to be applied on the cells.
- Type
Finite element
- quadrature#
An element-compatible numeric integration scheme with points and weights.
- Type
Quadrature scheme
- h#
Element shape function array
h_ap
of shape functiona
evaluated at quadrature pointp
.- Type
ndarray
- dhdr#
Partial derivative of element shape function array
dhdr_aJp
with shape functiona
w.r.t. natural element coordinateJ
evaluated at quadrature pointp
for every cellc
(geometric gradient or Jacobian transformation betweenX
andr
).- Type
ndarray
- dXdr#
Geometric gradient
dXdr_IJpc
as partial derivative of undeformed coordinateI
w.r.t. natural element coordinateJ
evaluated at quadrature pointp
for every cellc
(geometric gradient or Jacobian transformation betweenX
andr
).- Type
ndarray
- drdX#
Inverse of dXdr.
- Type
ndarray
- dV#
Numeric Differential volume element as product of determinant of geometric gradient
dV_pc = det(dXdr)_pc w_p
and quadrature weightw_p
, evaluated at quadrature pointp
for every cellc
.- Type
ndarray
- dhdX#
Partial derivative of element shape functions
dhdX_aJpc
of shape functiona
w.r.t. undeformed coordinateJ
evaluated at quadrature pointp
for every cellc
.- Type
ndarray
- class felupe.RegionBoundary(mesh, element, quadrature, grad=True, only_surface=True, mask=None, ensure_3d=False)[source]#
A numeric boundary-region as a combination of a mesh, an element and a numeric integration scheme (quadrature). The gradients of the element shape functions are evaluated at all integration points of each cell in the region if the optional gradient argument is True.
\[ \begin{align}\begin{aligned}\frac{\partial X^I}{\partial r^J} &= X_a^I \frac{\partial h_a}{\partial r^J}\\\frac{\partial h_a}{\partial X^J} &= \frac{\partial h_a}{\partial r^I} \frac{\partial r^I}{\partial X^J}\\dV &= \det\left(\frac{\partial X^I}{\partial r^J}\right) w\end{aligned}\end{align} \]- Parameters
mesh (Mesh) – A mesh with points and cells.
element (Element) – The finite element formulation to be applied on the cells.
quadrature (Quadrature) – An element-compatible numeric integration scheme with points and weights.
grad (bool, optional) – A flag to invoke gradient evaluation (default is True).
only_surface (bool, optional) – A flag to use only the enclosing outline of the region (default is True).
mask (ndarray or None, optional) – A boolean array to select a specific set of points (default is None).
ensure_3d (bool, optional) – A flag to enforce 3d area normal vectors.
- element#
The finite element formulation to be applied on the cells.
- Type
Finite element
- quadrature#
An element-compatible numeric integration scheme with points and weights.
- Type
Quadrature scheme
- h#
Element shape function array
h_ap
of shape functiona
evaluated at quadrature pointp
.- Type
ndarray
- dhdr#
Partial derivative of element shape function array
dhdr_aJp
with shape functiona
w.r.t. natural element coordinateJ
evaluated at quadrature pointp
for every cellc
(geometric gradient or Jacobian transformation betweenX
andr
).- Type
ndarray
- dXdr#
Geometric gradient
dXdr_IJpc
as partial derivative of undeformed coordinateI
w.r.t. natural element coordinateJ
evaluated at quadrature pointp
for every cellc
(geometric gradient or Jacobian transformation betweenX
andr
).- Type
ndarray
- drdX#
Inverse of dXdr.
- Type
ndarray
- dA#
Numeric Differential area vectors.
- Type
ndarray
- normals#
Area unit normal vectors.
- Type
ndarray
- dV#
Numeric Differential volume element as norm of Differential area vectors.
- Type
ndarray
- dhdX#
Partial derivative of element shape functions
dhdX_aJpc
of shape functiona
w.r.t. undeformed coordinateJ
evaluated at quadrature pointp
for every cellc
.- Type
ndarray
- class felupe.RegionQuadBoundary(mesh, only_surface=True, mask=None, ensure_3d=False)[source]#
Bases:
RegionBoundary
A region with a quad element.
- class felupe.RegionHexahedronBoundary(mesh, only_surface=True, mask=None)[source]#
Bases:
RegionBoundary
A region with a hexahedron element.
- class RegionHexahedron(mesh)#
A region with a hexahedron element.
- Members
- Undoc-members
- Show-inheritance
- class felupe.RegionConstantQuad(mesh, offset=0, npoints=None)[source]#
Bases:
Region
A region with a constant quad element.
- class felupe.RegionConstantHexahedron(mesh, offset=0, npoints=None)[source]#
Bases:
Region
A region with a constant hexahedron element.
- class felupe.RegionQuadraticHexahedron(mesh)[source]#
Bases:
Region
A region with a (serendipity) quadratic hexahedron element.
- class felupe.RegionTriQuadraticHexahedron(mesh)[source]#
Bases:
Region
A region with a tri-quadratic (lagrange) hexahedron element.
- class felupe.RegionQuadraticTriangle(mesh)[source]#
Bases:
Region
A region with a quadratic triangle element.