sfepy.discrete.fem.global_interp module¶
Global interpolation functions.
-
sfepy.discrete.fem.global_interp.
get_ref_coors
(field, coors, strategy='kdtree', close_limit=0.1, cache=None, verbose=True)[source]¶ Get reference element coordinates and elements corresponding to given physical coordinates.
Parameters: field : Field instance
The field defining the approximation.
coors : array
The physical coordinates.
strategy : str, optional
The strategy for finding the elements that contain the coordinates. Only ‘kdtree’ is supported for the moment.
close_limit : float, optional
The maximum limit distance of a point from the closest element allowed for extrapolation.
cache : Struct, optional
To speed up a sequence of evaluations, the field mesh, the inverse connectivity of the field mesh and the KDTree instance can be cached as cache.mesh, cache.offsets, cache.iconn and cache.kdtree. Optionally, the cache can also contain the reference element coordinates as cache.ref_coors, cache.cells and cache.status, if the evaluation occurs in the same coordinates repeatedly. In that case the KDTree related data are ignored.
verbose : bool
If False, reduce verbosity.
Returns: ref_coors : array
The reference coordinates.
cells : array
The cell indices corresponding to the reference coordinates.
status : array
The status: 0 is success, 1 is extrapolation within close_limit, 2 is extrapolation outside close_limit, 3 is failure.