ElementMeshInterpolation[{emesh},{f1,f2,…}]
ElementMeshオブジェクトの座標 j に対応する関数の値 fj のInterpolatingFunctionオブジェクトを構築する.
ElementMeshInterpolation[{{t1,t2,…},emesh},
{{{f11,f12,…}},{{f21,f22,…}},…}]
ElementMeshオブジェクトの離散 ti と座標 j に対応する関数の値 fij の補間を構築する.
ElementMeshInterpolation
ElementMeshInterpolation[{emesh},{f1,f2,…}]
ElementMeshオブジェクトの座標 j に対応する関数の値 fj のInterpolatingFunctionオブジェクトを構築する.
ElementMeshInterpolation[{{t1,t2,…},emesh},
{{{f11,f12,…}},{{f21,f22,…}},…}]
ElementMeshオブジェクトの離散 ti と座標 j に対応する関数の値 fij の補間を構築する.
詳細とオプション
- ElementMeshInterpolationは,InterpolatingFunctionオブジェクトを返す.このオブジェクトは他の純関数と同じように使える.
- 関数の値 f は,実数でも複素数でもよい.
- ElementMeshオブジェクトには曲線の要素を含むことができる.
- ElementMeshInterpolationは,同じ要素に属するデータ点間の多項式曲線にフィットさせて使う.
- 多項式曲線の次数は,オプションInterpolationOrderによって指定する.
- デフォルトInterpolationOrderは,ElementMeshの次数である.
- InterpolationOrder1と設定することによって,線形補間を行うことができる.
- ElementMeshInterpolation[data]は,値をMachinePrecisionで返すInterpolatingFunction オブジェクトを生成する.
- ElementMeshInterpolationにはInterpolationと同じオプションと,以下の追加オプションが使える:
-
"ExtrapolationHandler" Automatic 外挿がどのように扱われるかを指定する - NDSolveおよび関連の関数からオプションを設定することについては,有限要素のためのNDSolveオプションに説明がある.
例題
すべて開く すべて閉じる例 (2)
Needs["NDSolve`FEM`"]ElementMeshを設定する:
mesh = ToElementMesh[Disk[]]Short[values = Function[{x, y}, x ^ 2 + y ^ 2]@@@mesh["Coordinates"]]InterpolatingFunctionを作成する:
if = ElementMeshInterpolation[{mesh}, values]if[0, 0]Plot3D[if[x, y], {x, y}∈Disk[]]time = Range[0, 1, 0.1];
data = {values * #}& /@ Sin[time];tif = ElementMeshInterpolation[{time, mesh}, data]オプション (6)
"ExtrapolationHandler" (6)
InterpolatingFunctionを構築する:
if = ElementMeshInterpolation[{mesh}, values]領域外のInterpolatingFunctionについてクエリを行う:
if[2, 2]領域外のクエリについてIndeterminateを返す外挿ハンドラを含むInterpolatingFunctionを構築する:
if = ElementMeshInterpolation[{mesh}, values, "ExtrapolationHandler" -> {Function[Indeterminate]}]領域外のInterpolatingFunctionについてクエリを行う:
if[2, 2]領域外で外挿を行い,警告メッセージを発しない外挿ハンドラを含むInterpolatingFunctionを構築する:
if = ElementMeshInterpolation[{mesh}, values, "ExtrapolationHandler" -> {Automatic, "WarningMessage" -> False}]領域外のInterpolatingFunctionについてクエリを行う:
if[2, 2]領域外のクエリについて0を返す外挿ハンドラを含むInterpolatingFunctionを構築する:
if = ElementMeshInterpolation[{mesh}, values, "ExtrapolationHandler" -> {Function[0.]}]領域外のInterpolatingFunctionについてクエリを行う:
if[2, 2]領域外のクエリについてIndeterminateを返し,警告メッセージを発しない外挿ハンドラを含むInterpolatingFunctionを構築する:
if = ElementMeshInterpolation[{mesh}, values, "ExtrapolationHandler" -> {Function[Indeterminate], "WarningMessage" -> False}]領域外のInterpolatingFunctionについてクエリを行う:
if[2, 2]NDSolveと有限要素法のデフォルトでは,指定された領域外で外挿しないInterpolatingFunctionオブジェクトが返される:
ifun = NDSolveValue[{Laplacian[u[x, y], {x, y}] == 1, DirichletCondition[u[x, y] == 0, True]}, u, {x, y}∈Disk[]];
ifun[2, 0]NDSolveが生成したInterpolatingFunctionオブジェクトが,シミュレーション領域外で評価されたときに外挿されるように,そして警告メッセージが返されないようにする:
ifun = NDSolveValue[{Laplacian[u[x, y], {x, y}] == 1, DirichletCondition[u[x, y] == 0, True]}, u, {x, y}∈Disk[], "ExtrapolationHandler" -> {Automatic, "WarningMessage" -> False}];
ifun[2, 0]任意メッシュに対して周期的な補間関数を構築することは通常可能ではないが,"ExtrapolatiopnHandler"を指定することによって,矩形領域に基づく周期的な補間関数を真似ることは可能である.
data = Flatten[Table[{i, j, Sin[i + j]}, {i, 0, 2 π, 2 π / 50}, {j, 0, 2 π, 2 π / 50}], 1];
mesh = ToElementMesh["Coordinates" -> data[[All, {1, 2}]]]temp = ElementMeshInterpolation[{mesh}, data[[All, 3]]];外挿ハンドラを使って,メッシュを付けた領域の外にある座標を領域内にマップし直し,一時的な補間関数上で評価する:
f = ElementMeshInterpolation[{mesh}, data[[ ;; , -1]], "ExtrapolationHandler" -> {Function[{x, y}, temp[Mod[x, 2 π], Mod[y, 2 π]]]}]補間が周期的になったことを確かめるために,もとの領域の内側と外側の両方で関数 f を可視化する:
{ContourPlot[f[x, y], {x, 0, 2 π}, {y, 0, 2 π}], ContourPlot[f[x, y], {x, 0, 4 π}, {y, 0, 4 π}]}特性と関係 (1)
時間独立の補間にもListInterpolationは使える:
ListInterpolation[values, mesh]テクニカルノート
関連するガイド
-
▪
- 有限要素法
テキスト
Wolfram Research (2020), ElementMeshInterpolation, Wolfram言語関数, https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html (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.
APA
Wolfram Language. (2020). ElementMeshInterpolation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html
BibTeX
@misc{reference.wolfram_2026_elementmeshinterpolation, author="Wolfram Research", title="{ElementMeshInterpolation}", year="2024", howpublished="\url{https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html}", note=[Accessed: 09-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_elementmeshinterpolation, organization={Wolfram Research}, title={ElementMeshInterpolation}, year={2024}, url={https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMeshInterpolation.html}, note=[Accessed: 09-August-2026]}