pysdic.Mesh.validate_integration_points#
- Mesh.validate_integration_points(integration_points)[source]#
Check that integration points are consistent with the mesh.
The following conditions are checked:
integration_pointsis apysdic.IntegrationPoints.The element type of the mesh is set, and its topological dimension \(K\) is the number of natural coordinates of the points.
The element indices of the located points are lower than \(N_e\) (the unlocated points, with element index
-1, are accepted).
The natural coordinates are not checked against the reference element: the
pysdic.femfunctions handle the points outside it.- Parameters:
integration_points (
pysdic.IntegrationPoints) – The integration points to check.- Raises:
TypeError – If
integration_pointsis not apysdic.IntegrationPoints.ValueError – If the mesh has no element type, or if the topological dimensions differ.
IndexError – If a point refers to an element \(\geq N_e\).
- Return type:
None
Examples
1from pysdic import Mesh, IntegrationPoints 2 3mesh = Mesh([[0, 0, 0], [1, 0, 0], [0, 1, 0]], [[0, 1, 2]], element_type="triangle_3") 4 5mesh.validate_integration_points(IntegrationPoints.from_gauss_points("triangle_3", 1)) # OK 6mesh.validate_integration_points(IntegrationPoints([[0.2, 0.2]], [1])) # IndexError