Coulomb FMM の multi-index と微分テーブル計算。
FMM の多重指数テーブルと評価用補助テーブルを初期化する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(inout) | :: | plan |
初期化対象の FMM plan。 |
||
| integer(kind=i32), | intent(in) | :: | order |
展開次数。 |
3 軸の冪を order まで順に計算する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | d(3) | |||
| integer(kind=i32), | intent(in) | :: | order |
計算する最大次数。 |
||
| real(kind=dp), | intent(out) | :: | xpow(0:order) | |||
| real(kind=dp), | intent(out) | :: | ypow(0:order) | |||
| real(kind=dp), | intent(out) | :: | zpow(0:order) |
ラプラス核の多重微分係数を計算する。 1/sqrt(|r|^2 + s^2) の全次数の偏微分 ∂^α f を漸化式で求める。 f = a^{-1/2}(a = |r|^2 + s^2)は a ∂_i f = -x_i f を満たし、Leibniz 則で ∂^β を当てると D(β+e_i) = -[ x_i D(β) + β_i D(β-e_i) + 2Σ_j β_j x_j D(β+e_i-e_j) + Σ_j β_j(β_j-1) D(β+e_i-2e_j) ] / a となる。multi-index は次数昇順に並んでいるので、1 回の走査で全次数が決まる。 旧来の多項式乗算版 compute_laplace_derivatives_reference と同じ値を返す(契約テストで検査)。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan |
多重指数テーブルを持つ FMM plan。 |
||
| real(kind=dp), | intent(in) | :: | r(3) | |||
| real(kind=dp), | intent(out) | :: | deriv(:) |
旧実装: (1+q)^{-1/2} の多項式展開を反復乗算で組み立てる。契約テストの参照用に残す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan | |||
| real(kind=dp), | intent(in) | :: | r(3) | |||
| real(kind=dp), | intent(out) | :: | deriv(:) |