ElementMeshInterpolation

ElementMeshInterpolation[{emesh},{f1,f2,…}]
constructs an InterpolatingFunction object of the function values fj, corresponding to coordinate j of an ElementMesh object.
ElementMeshInterpolation[{{t1,t2,…},emesh},
{{{f11,f12,…}},{{f21,f22,…}},…}]
constructs an interpolation of the function values fij, corresponding to discrete ti and coordinate j of an ElementMesh object.
Details and Options
- ElementMeshInterpolation returns an InterpolatingFunction object, which can be used like any other pure function.
- The function values f can be real or complex numbers.
- The ElementMesh object may contain curved elements.
- ElementMeshInterpolation works by fitting polynomial curves between data points belonging to the same element.
- The degree of the polynomial curves is specified by the option InterpolationOrder.
- The default InterpolationOrder is the order of the ElementMesh.
- You can do linear interpolation by using the setting InterpolationOrder1.
- ElementMeshInterpolation[data] generates an InterpolatingFunction object that returns values with MachinePrecision.
- ElementMeshInterpolation has the same options as Interpolation, with the following additions:
-
"ExtrapolationHandler" Automatic specify how extrapolation is handled - Setting the option from NDSolve and related functions is explained in NDSolve Finite Element Options.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-peipk
Set up an ElementMesh:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-nx6wf8

Set up function values at the mesh coordinates:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-td38jm

Create an InterpolatingFunction:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-e4uobh

Apply the function to find interpolated values:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-cocphs

Plot the interpolating function:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-numkhs

Generate function values for a time-dependent interpolation:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-fyr7iw
Construct a time-dependent interpolating function:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-ix49j1

Options (6)Common values & functionality for each option
"ExtrapolationHandler" (6)
Construct an InterpolatingFunction:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-zwonn

Query the InterpolatingFunction outside of its domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-d4jxll


Construct an InterpolatingFunction with an extrapolation handler that returns Indeterminate for queries outside the domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-hukm6g

Query the InterpolatingFunction outside of its domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-yvbrfh


Construct an InterpolatingFunction with an extrapolation handler that extrapolates outside its domain and does not give a warning message:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-8r0in6

Query the InterpolatingFunction outside of its domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-i2byi8

Construct an InterpolatingFunction with an extrapolation handler that returns 0 outside its domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-28tyh

Query the InterpolatingFunction outside of its domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-qbmmou


Construct an InterpolatingFunction with an extrapolation handler that returns Indeterminate outside its domain and does not give a warning message:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-4k1lqq

Query the InterpolatingFunction outside of its domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-md30dw

The default for NDSolve and the finite element method is to return InterpolatingFunction objects that do not extrapolate outside of the given domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-xso6jo


Allow InterpolatingFunction objects generated by NDSolve to extrapolate when evaluated outside of the simulation domain and not warn about it:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-vuddt0

While it is not generally possible to construct periodic interpolating functions for arbitrary meshes, one can mimic periodic interpolating functions based on rectangular regions by specifying an "ExtrapolatiopnHandler".

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-nulb6z

Generate a temporary interpolating function from this mesh and data:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-8sgocj
Use the extrapolation handler to map the coordinates outside of the meshed domain back into the domain and evaluate over the temporary interpolating function:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-m0eppo

To verify that the interpolation is now periodic, visualize the function f both inside and outside the original domain:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-6jwpxg

Properties & Relations (1)Properties of the function, and connections to other functions
For time-independent interpolation, ListInterpolation can also be used:

https://wolfram.com/xid/0cesm663z85kfkllfon2hrngy-sq0zan

Wolfram Research (2020), ElementMeshInterpolation, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html (updated 2024).
Text
Wolfram Research (2020), ElementMeshInterpolation, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html (updated 2024).
Wolfram Research (2020), ElementMeshInterpolation, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html (updated 2024).
CMS
Wolfram Language. 2020. "ElementMeshInterpolation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html.
Wolfram Language. 2020. "ElementMeshInterpolation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html.
APA
Wolfram Language. (2020). ElementMeshInterpolation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html
Wolfram Language. (2020). ElementMeshInterpolation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html
BibTeX
@misc{reference.wolfram_2025_elementmeshinterpolation, author="Wolfram Research", title="{ElementMeshInterpolation}", year="2024", howpublished="\url{https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html}", note=[Accessed: 18-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_elementmeshinterpolation, organization={Wolfram Research}, title={ElementMeshInterpolation}, year={2024}, url={https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html}, note=[Accessed: 18-April-2025
]}