Search and Interpolation

ExtendableGrids.gFindLocal!Function
icellfound=GFindLocal!(xref,cellfinder,p; icellstart=1,eps=1.0e-14, trybrute=true)

Find cell containing point p starting with cell number icellstart.

Returns cell number if found, zero otherwise. If trybrute==true try gFindBruteForce! before giving up. Upon return, xref contains the barycentric coordinates of the point in the sequence dim+1, 1...dim

Warning

Currently implemented for simplex grids only.

source
ExtendableGrids.gFindBruteForce!Function
icellfound=gFindBruteForce!(xref,cellfinder,p; icellstart=1,eps=1.0e-14)

Find cell containing point p starting with cell number icellstart.

Returns cell number if found, zero otherwise. Upon return, xref contains the barycentric coordinates of the point in the sequence dim+1, 1...dim

Warning

Currently implemented for simplex grids only.

source

Interpolation

ExtendableGrids.interpolateFunction
u_to=interpolate(grid_to, u_from, grid_from;eps=1.0e-14,trybrute=true)

Piecewise linear interpolation of function u_from on grid grid_from to grid_to. Works for matrices with second dimension corresponding to grid nodes and for vectors.

Warning

May be slow on non-convex domains. If trybrute==false it may even fail.

Warning

Currently implemented for simplex grids only.

source