-
See Also
- Interpolation
- ListInterpolation
-
- Functions
- ToElementMesh
-
-
See Also
- Interpolation
- ListInterpolation
-
- Functions
- ToElementMesh
-
See Also
Interpolation::udeg
Examples
Basic Examples (1)
A warning occurs because currently no algorithm is implemented that allows to recover a higher-order interpolation on a list of unstructured points:
pts = Flatten[Table[RandomReal[1, {2}], {i, 10}, {j, 10}], 1];
f = RandomReal[1, 100];
Interpolation[Transpose[{pts, f}]]Internally a mesh needs to be created:
Needs["NDSolve`FEM`"]
mesh = ToElementMesh[pts]mesh["MeshOrder"]Visualize the mesh coordinates:
HighlightMesh[MeshRegion[mesh], {0, All}]A mesh can be converted to a higher order:
mesh2 = MeshOrderAlteration[mesh, 2];
mesh2["MeshOrder"]A second-order mesh introduces midside nodes:
HighlightMesh[MeshRegion[mesh2], {0, All}]The remaining question is to find the correct values at the midside nodes from the given (linear) point set f. If such values can be found then a second-order interpolation is possible. Currently no such algorithm is implemented.
If more information about the dataset is available and values for the midside nodes can be generated, a second-order interpolation can be constructed in the following manner. To generate a set of values for the second-order mesh, a function is evaluated at the second-order mesh coordinates:
g = Function[{x, y}, Sqrt[x ^ +y ^ 2]]@@@mesh2["Coordinates"];A second-order interpolating function is generated:
if = ListInterpolation[g, mesh2]Inspect the mesh order of the interpolating function:
if["ElementMesh"]["MeshOrder"]