Search and Interpolation
Search
ExtendableGrids.CellFinder
— Typestruct CellFinder{Tv, Ti}
CellFinder supports finding cells in grids.
ExtendableGrids.gFindLocal!
— Functionicellfound=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
Currently implemented for simplex grids only.
ExtendableGrids.gFindBruteForce!
— Functionicellfound=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
Currently implemented for simplex grids only.
Interpolation
ExtendableGrids.interpolate
— Functionu_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.
May be slow on non-convex domains. If trybrute==false
it may even fail.
Currently implemented for simplex grids only.
ExtendableGrids.interpolate!
— Functioninterpolate!(u_to,grid_to, u_from, grid_from;eps=1.0e-14,trybrute=true)
Mutating form of interpolate