query_points#

ensight.query_points(*args, **kwargs) Any#

This function is a basic variable and mesh query mechanism:

ensight.query_points(points: List[List[float, float, float],
                     parts: Any = None,
                     variables: List[int] = None,
                     time: float = -1e9) -> List[Any]
Args:
points:

A list of points to query (a Python list of 3 value python lists). An example would be: [ [1,2,0], [2,4,2] ] for two points. The function will perform a query at each point in the list.

parts:

If no parts are specified, the currently selected parts will be used. Otherwise, parts may be set to the string “all” to search all parts or it may be a list of parts. In the list, the values can be part names, part numbers or part objects. For example: parts=["mesh","field",8] will include the parts named mesh, field and part number 8 in the query.

variables:

If present, variables should be a Python list variable that may include any mixture of string names, variable numbers or variable objects for all the variables that should be included in the query. For example: variables=["velocity","pressure",2] will include output for the variables named velocity, pressure and variable number 2 in the query.

time:

If not present, the query will be for the current time value in EnSight. The caller can also specify a specific time value using this keyword.

Return:

The return value is a list of output lists. One list for each input point. If no variables are specified, the query will be about the mesh structure and the list for each point will appear as:

[part_number, structuredpart_flag, closest_node, element_id]

The values are the part number the point was found in, a flag that is non-zero if the part is structured, the node id of the node closest to the point and the element id of the element that contains the point. If a list of variables is specified, the returned value will be a list of lists, one for each variable. If the input variables were “pressure” and “velocity” (a scalar and a vector), the output (per point) would be:

[ [pressure_value], [velocity_x, velocity_y, velocity_z] ]