MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / interpolate_at_centroids

Function interpolate_at_centroids

scripts/fem_check.py:102–110  ·  view source on GitHub ↗
(mesh, sol_values, sol_grads)

Source from the content-addressed store, hash-verified

100 return values, grads;
101
102def interpolate_at_centroids(mesh, sol_values, sol_grads):
103 tets = mesh.voxels;
104 values = np.zeros(mesh.num_voxels);
105 values += sol_values[tets[:,0]];
106 values += sol_values[tets[:,1]];
107 values += sol_values[tets[:,2]];
108 values += sol_values[tets[:,3]];
109 values /= 4.0;
110 return values, sol_grads;
111
112def fit_into_unit_sphere(mesh):
113 bbox_min, bbox_max = mesh.bbox;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected