simtools

class pyvale.simtools.SimTools[source]

Bases: object

Namespace for tools required for analysing simulation results.

static centre_mesh_nodes(nodes: ndarray, spat_dim: int) ndarray[source]

A method to centre the nodes of a mesh around the origin.

Parameters:
  • nodes (np.ndarray) -- An array containing the node locations of the mesh.

  • spat_dim (int) -- The spatial dimension of the mesh.

Returns:

np.ndarray -- An array containing the mesh node locations, but centred around the origin.

static get_deformed_nodes(timestep: int, render_mesh: RenderMesh) ndarray | None[source]
A method to obtain the deformed locations of all the nodes at a given

timestep.

Parameters:
  • timestep (int) -- The timestep at which to find the deformed nodes.

  • render_mesh (RenderMeshData) -- A dataclass containing the skinned mesh and simulation results.

Returns:

np.ndarray | None -- An array containing the deformed values of all the components at each node location. Returns None if there are no deformation values.