warp.fem.lookup#
- warp.fem.lookup = <warp._src.fem.operator.Operator object>#
Look up the sample point corresponding to a world position
x, projecting to the closest point on the geometry.Supported call forms include:
lookup(domain, x)lookup(domain, x, max_dist)lookup(domain, x, guess)lookup(domain, x, env_index)lookup(domain, x, max_dist, env_index)lookup(domain, x, filter_array, filter_target)lookup(domain, x, max_dist, filter_array, filter_target)lookup(domain, x, filter_array, filter_target, env_index)lookup(domain, x, max_dist, filter_array, filter_target, env_index)
For multi-environment geometries, pass an explicit
env_indexto disambiguate the query. Callinglookup(domain, x)without an environment index is only supported for single-environment geometries and raises an exception for multi-environment geometries. Lookup with aguesssample preserves the guess environment when the geometry supports multiple environments. Side-sample hints are ambiguous, so side-domain integrands that need a cell lookup should use the explicitenv_indexoverload.- Parameters:
x (vec3) – world position of the point to look up in the geometry
max_dist (float) – maximum distance to look for a closest point
guess (
Sample) – initial guess, may help perform the queryenv_index (int) – environment index to query in a multi-environment geometry
filter_array (warp.array) – Used in conjunction with
filter_target. Only cells such thatfilter_array[element_index] == filter_targetwill be considered.filter_target (Any) – See
filter_array