mymesh.implicit.grid2grad#

mymesh.implicit.grid2grad(VoxelCoords, VoxelConn, NodeVals, method='linear')[source]#

Converts a voxel grid mesh into a function. The function can be evaluated at any point within the bounds of the grid to return the gradient of the function.

Parameters:
  • VoxelCoords (List of Lists) – List of nodal coordinates for the voxel mesh

  • VoxelConn (List of Lists) – Nodal connectivity list for the voxel mesh.

  • NodeVals (list) – List of values at each node.

Returns:

frad – Interpolation function, takes arguments (x,y,z), to return an evaluation of the function gradient at the specified point.

Return type:

function