periodic2 cached operator生成用のEwald teacher。
periodic2 Ewald の減衰係数 alpha を決定する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan |
FMM 計画。 |
periodic2 Ewald の k≠0 項 exp(kz)erfc(karg0 + adz) を overflow させずに返す。 kz = ±|k|dz と adz = ±alphadz は同じ符号で、karg0 = |k|/(2 alpha) なので kz - (karg0 + adz)^2 = -(karg0^2 + adz^2) が成り立つ。 exp(kz) が binary64 で有限な kz では元の積をそのまま返す(従来の式とビット一致)。 exp(kz) が overflow する kz では y = karg0 + adz >= sqrt(2 kz) > 37 なので erfc は 0 に underflow し、 元の積は inf0 = NaN になる。この範囲だけ exp(-(karg0^2 + adz^2))erfc_scaled(y) で評価する。 真値はこのとき exp(-kz) 以下で、binary64 では 0 か非正規数になる。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | kz |
指数の引数 ±|k|dz。 |
||
| real(kind=dp), | intent(in) | :: | karg0 |
指数の引数 ±|k|dz。 |k|/(2 alpha)。 |
||
| real(kind=dp), | intent(in) | :: | adz |
指数の引数 ±|k|dz。 |k|/(2 alpha)。 kz と同符号の ±alpha*dz。 |
periodic2 Ewald の事前計算データを作成する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(inout) | :: | plan |
FMM 計画。 |
1 粒子分の periodic2 Ewald 補正を加算する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan |
FMM 計画。 |
||
| real(kind=dp), | intent(in) | :: | q |
電荷量。 |
||
| real(kind=dp), | intent(in) | :: | src(3) | |||
| real(kind=dp), | intent(in) | :: | target(3) | |||
| real(kind=dp), | intent(inout) | :: | e(3) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan | |||
| real(kind=dp), | intent(in) | :: | q | |||
| real(kind=dp), | intent(in) | :: | src(3) | |||
| real(kind=dp), | intent(in) | :: | target(3) | |||
| real(kind=dp), | intent(inout) | :: | e(3) |
1 粒子分の periodic2 Ewald の電位補正を加算する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan |
FMM 計画。 |
||
| real(kind=dp), | intent(in) | :: | q |
電荷量。 |
||
| real(kind=dp), | intent(in) | :: | src(3) | |||
| real(kind=dp), | intent(in) | :: | target(3) | |||
| real(kind=dp), | intent(inout) | :: | phi |
電位。 |
1 粒子分の periodic2 Ewald 補正の電場と電位を、超越関数を共有して 1 回で加算する。 個別の電場・電位ルーチンを続けて呼ぶのと同じ値を返す(operator 作成の teacher 用)。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan | |||
| real(kind=dp), | intent(in) | :: | q | |||
| real(kind=dp), | intent(in) | :: | src(3) | |||
| real(kind=dp), | intent(in) | :: | target(3) | |||
| real(kind=dp), | intent(inout) | :: | e(3) | |||
| real(kind=dp), | intent(inout) | :: | phi |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan | |||
| real(kind=dp), | intent(in) | :: | q | |||
| real(kind=dp), | intent(in) | :: | src(3) | |||
| real(kind=dp), | intent(in) | :: | target(3) | |||
| real(kind=dp), | intent(inout) | :: | phi |