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).

mesh#

A mesh with points and cells.

Type

Mesh

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 function a evaluated at quadrature point p.

Type

ndarray

dhdr#

Partial derivative of element shape function array dhdr_aJp with shape function a w.r.t. natural element coordinate J evaluated at quadrature point p for every cell c (geometric gradient or Jacobian transformation between X and r).

Type

ndarray

dXdr#

Geometric gradient dXdr_IJpc as partial derivative of undeformed coordinate I w.r.t. natural element coordinate J evaluated at quadrature point p for every cell c (geometric gradient or Jacobian transformation between X and r).

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 weight w_p, evaluated at quadrature point p for every cell c.

Type

ndarray

dhdX#

Partial derivative of element shape functions dhdX_aJpc of shape function a w.r.t. undeformed coordinate J evaluated at quadrature point p for every cell c.

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.

mesh#

A mesh with points and cells.

Type

Mesh

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 function a evaluated at quadrature point p.

Type

ndarray

dhdr#

Partial derivative of element shape function array dhdr_aJp with shape function a w.r.t. natural element coordinate J evaluated at quadrature point p for every cell c (geometric gradient or Jacobian transformation between X and r).

Type

ndarray

dXdr#

Geometric gradient dXdr_IJpc as partial derivative of undeformed coordinate I w.r.t. natural element coordinate J evaluated at quadrature point p for every cell c (geometric gradient or Jacobian transformation between X and r).

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 function a w.r.t. undeformed coordinate J evaluated at quadrature point p for every cell c.

Type

ndarray

class felupe.RegionQuad(mesh)[source]#

Bases: Region

A region with a quad element.

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.RegionTriangle(mesh)[source]#

Bases: Region

A region with a triangle element.

class felupe.RegionTetra(mesh)[source]#

Bases: Region

A region with a tetra element.

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.

class felupe.RegionQuadraticTetra(mesh)[source]#

Bases: Region

A region with a quadratic tetra element.

class felupe.RegionTriangleMINI(mesh)[source]#

Bases: Region

A region with a triangle-MINI element.

class felupe.RegionTetraMINI(mesh)[source]#

Bases: Region

A region with a tetra-MINI element.

class felupe.RegionLagrange(mesh, order, dim)[source]#

Bases: Region

A region with an arbitrary order lagrange element.