fem.properties.sample_material_field

fem.properties.sample_material_field(sdf, points, cells)

Sample the whole material field at every element centroid.

Parameters

Name Type Description Default
sdf Any Scene SDF object answering material_at(p) -> dict. required
points Any Node positions (N, 3) (may be traced). required
cells Any Connectivity (C, ...). required

Returns

Name Type Description
dict[str, Any] The material dict with every value batched over elements: scalar
dict[str, Any] properties shaped (C,) and color shaped (C, 3).