# fem.py¶

Define the classes, methods and functions for Finite Element Method (FEM) of lowest order in tetrahedral meshes.

`petgem.efem.fem.``cartesianToVolumetricCoordinates`(x, y, z, r)[source]

Change of cartesian coord to volumetric coord.

Parameters: x (float-array) – x-coord of real element. y (float-array) – y-coord of real element. z (float-array) – z-coord of real element. r (float-array) – xyz-coord of reference element. points in volumetric coord. ndarray
`petgem.efem.fem.``gauss_points_reference_tetrahedron`(npointeg, nedelec_order)[source]

Compute the quadrature points X,Y,Z and the weights Wi for the integration over the reference tetrahedral.

Parameters: npointeg (int) – number of gauss points to be computed. nedelec_order (int) – nedelec element order. quadrature Gauss points (X, Y, Z) and Gauss weights. ndarray.

Note

References:

Amor-Martin, A., Garcia-Castillo, L. E., & Garcia-Doñoro, D. D. (2016). Second-order Nédélec curl-conforming prismatic element for computational electromagnetics. IEEE Transactions on Antennas and Propagation, 64(10), 4384-4395.

`petgem.efem.fem.``gauss_points_tetrahedron`(polyOrder)[source]

Compute the quadrature points X and the weights W for the integration over the unit tetrahedra whose nodes are (0,0,0), (1,0,0), (0,1,0) and (0,0,1).

Parameters: polyOrder (int) – degree of polynominal quadrature Gauss points and Gauss weights. ndarray.

Note

References:

P Keast, Moderate degree tetrahedral quadrature formulas, CMAME 55: 339-348 (1986).

O.C. Zienkiewicz, The Finite Element Method, Sixth Edition.

`petgem.efem.fem.``tetraXiEtaZeta2XYZ`(eleNodes, XiEtaZetaPoints)[source]

Map a set of points in XiEtaZeta coord to XYZ coord.

Parameters: eleNodes (ndarray) – nodal spatial coord of the tetrahedral element. XiEtaZetaPoints (ndarray) – set of points in XiEtaZeta coord. new spatial coord of XiEtaZetaPoints. ndarray.
`petgem.efem.fem.``unitary_test`()[source]

Unitary test for fem.py script.

`petgem.efem.fem.``volumetricToCartesianCoordinates`(x, y, z, L)[source]

Change of volumetric coord to cartesian coord.

Parameters: x (float-array) – x-coord of real element. y (float-array) – y-coord of real element. z (float-array) – z-coord of real element. L (float-array) – xyz-coord of reference element. points in cartesian coord. ndarray