Operations on Integration Points (interpolation, projection, etc.)#

In this module:

  • compute_* functions perform the full computation starting from mesh geometry and integration points. They internally re-compute shape functions, Jacobians, and other required quantities.

  • assemble_* functions operate on precomputed quantities (shape functions, Jacobians, weights, etc.) and perform only the final algebraic operation. They are intended for advanced usage and performance-critical workflows.

Description#

The package pysdic provides functions to perform operations for various types of elements used in finite element analysis.

In a space of dimension \(E\) with a mesh constituted of \(N_{e}\) elements and \(N_{v}\) nodes/vertices. The mesh is composed of \(K\)-dimensional elements (with \(K \leq E\)) defined by \(N_{vpe}\) nodes for each element.

The objective of these operations is to interpolate or project values defined at integration points to nodes or other points in space, and vice versa.

If we consider a property \(P\) defined at the vertices of the elements, we can interpolate this property at any point within the element using shape functions:

\[P(\xi, \eta, \zeta, ...) = \sum_{i=1}^{N_{vpe}} N_i(\xi, \eta, \zeta, ...) P_i\]

where \(P\) is the interpolated value at the point, \(N_i\) are the shape functions, and \(P_i\) are the nodal values.

See also

Building operation matrices and precomputed quantities#

In this section:

  • shape_function refers to the computed shape functions values at the integration points with shape \((N_{p}, N_{vpe})\).

  • shape_function_derivative refers to the computed shape function derivatives at the integration points with shape \((N_{p}, N_{vpe}, K)\) with respect to the natural coordinates.

  • shape_function_matrix refers to the assembled shape function matrix at the integration points with shape \((N_{p}, N_{v})\).

  • jacobian_matrix refers to the Jacobian matrix of the transformation from natural coordinates to global coordinates at the integration points with shape \((N_{p}, E, K)\) (ie \(J = \frac{\partial (x, y, z, ...)}{\partial (\xi, \eta, \zeta, ...)}\)).

assemble_shape_function_matrix

Assemble the shape function matrix \(\mathcal{N}\) at given integration points within elements with shape \((N_{p}, N_{v})\), from precomputed shape functions values with zero-filling for non-associated nodes/vertices.

compute_shape_function_matrix

Compute and assemble the shape function matrix \(\mathcal{N}\) at given integration points within specified elements with shape \((N_{p}, N_{v})\).

assemble_jacobian_matrix

Assemble the Jacobian (derivative) matrix \(J\) of the transformation from natural coordinates \((\xi, \eta, \zeta, ...)\) to global coordinates \((x, y, z, ...)\) with shape \((N_{p}, E, K)\) from precomputed shape function derivatives and remapped vertex coordinates.

compute_jacobian_matrix

Compute and assemble the Jacobian (derivative) matrix \(J\) of the transformation from natural coordinates \((\xi, \eta, \zeta, ...)\) to global coordinates \((x, y, z, ...)\) with shape \((N_{p}, E, K)\) at given integration points within specified elements.

remap_vertices_coordinates

Remap the global coordinates of the vertices to given integration points within elements based on the element connectivity, and the remapped coordinates will have shape \((N_{p}, N_{vpe}, E)\).

Performing property interpolation, projection, and derivatives at integration points#

In this section:

  • interpolation refers to interpolating vertices properties \((N_v, P)\) to integration points \((N_{p}, P)\).

  • projection refers to projecting properties defined at integration points \((N_{p}, P)\) back to vertices \((N_v, P)\).

  • derivative refers to computing the spatial derivatives of properties defined at vertices \((N_v, P)\) at integration points \((N_{p}, \nabla P)\) with respect to the global coordinates.

assemble_property_interpolation

Interpolate a property defined at the nodes of a mesh to given integration points within elements using precomputed shape functions .

compute_property_interpolation

Interpolate a property defined at the nodes of a mesh to given integration points within elements using mesh and integration point information.

assemble_property_projection

Project a property defined at integration points within elements back to the nodes of a mesh using a precomputed shape function matrix.

compute_property_projection

Project a property defined at integration points within elements back to the nodes of a mesh using mesh and integration point information.

assemble_property_derivative

Assemble the derivative of a property defined at the nodes of a mesh to given integration points within elements with respect to global coordinates \((x,y,z,...)\) from precomputed shape function derivatives and Jacobian matrices.

compute_property_derivative

Compute and assemble the derivative of a property defined at the nodes of a mesh to given integration points within elements with respect to global coordinates \((x,y,z,...)\) from mesh and integration point information.