| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i32), | public | :: | nspecies | = | 0_i32 | ||
| integer(kind=i32), | public | :: | batch_count | = | 0_i32 | ||
| real(kind=dp), | public | :: | surface_charge_before | = | 0.0_dp | ||
| real(kind=dp), | public | :: | surface_charge_after | = | 0.0_dp | ||
| real(kind=dp), | public | :: | local_flight_charge_before | = | 0.0_dp | ||
| real(kind=dp), | public | :: | local_flight_charge_after | = | 0.0_dp | ||
| real(kind=dp), | public | :: | unresolved_stock_before | = | 0.0_dp | ||
| real(kind=dp), | public | :: | unresolved_stock_after | = | 0.0_dp | ||
| real(kind=dp), | public, | allocatable | :: | injected_from_remote(:) | |||
| real(kind=dp), | public, | allocatable | :: | emitted_from_surface(:) | |||
| real(kind=dp), | public, | allocatable | :: | absorbed_on_surface(:) | |||
| real(kind=dp), | public, | allocatable | :: | escaped_to_infinity(:) | |||
| real(kind=dp), | public, | allocatable | :: | discarded_unresolved(:) | |||
| real(kind=dp), | public, | allocatable | :: | neutral_return_correction(:) | |||
| real(kind=dp), | public, | allocatable | :: | neutral_return_weight_scale(:) | |||
| real(kind=dp), | public, | allocatable | :: | neutral_return_unresolved_fraction(:) | |||
| real(kind=dp), | public, | allocatable | :: | fixed_absorbed_target_charge(:) | |||
| real(kind=dp), | public, | allocatable | :: | fixed_absorbed_weight_scale(:) | |||
| real(kind=dp), | public, | allocatable | :: | fixed_emission_target_charge(:) | |||
| real(kind=dp), | public, | allocatable | :: | fixed_emission_weight_scale(:) | |||
| real(kind=dp), | public, | allocatable | :: | fixed_escape_target_charge(:) | |||
| real(kind=dp), | public, | allocatable | :: | fixed_escape_correction(:) | |||
| real(kind=dp), | public, | allocatable | :: | fixed_current_correction(:) | |||
| integer(kind=i64), | public, | allocatable | :: | injected_count(:) | |||
| integer(kind=i64), | public, | allocatable | :: | emitted_count(:) | |||
| integer(kind=i64), | public, | allocatable | :: | absorbed_count(:) | |||
| integer(kind=i64), | public, | allocatable | :: | escaped_count(:) | |||
| integer(kind=i64), | public, | allocatable | :: | discarded_unresolved_count(:) |
species 数に合わせて ledger の flux/count 配列を確保する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(charge_ledger_type), | intent(inout) | :: | self | |||
| integer(kind=i32), | intent(in) | :: | nspecies |
stock と flux を 0 に戻し、対象 batch 番号を設定する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(charge_ledger_type), | intent(inout) | :: | self | |||
| integer(kind=i32), | intent(in) | :: | batch_count |
stock 差分と remote flux から transactional conservation residual を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(charge_ledger_type), | intent(in) | :: | self |
species 間で相殺しない max-step discard charge の絶対値和を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(charge_ledger_type), | intent(in) | :: | self |
residual とは独立に discard charge/count が許容値を超えたか返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(charge_ledger_type), | intent(in) | :: | self | |||
| real(kind=dp), | intent(in) | :: | max_abs_charge | |||
| integer(kind=i64), | intent(in) | :: | max_count |
type, public :: charge_ledger_type integer(i32) :: nspecies = 0_i32 integer(i32) :: batch_count = 0_i32 real(dp) :: surface_charge_before = 0.0_dp real(dp) :: surface_charge_after = 0.0_dp real(dp) :: local_flight_charge_before = 0.0_dp real(dp) :: local_flight_charge_after = 0.0_dp real(dp) :: unresolved_stock_before = 0.0_dp real(dp) :: unresolved_stock_after = 0.0_dp real(dp), allocatable :: injected_from_remote(:) real(dp), allocatable :: emitted_from_surface(:) real(dp), allocatable :: absorbed_on_surface(:) real(dp), allocatable :: escaped_to_infinity(:) real(dp), allocatable :: discarded_unresolved(:) real(dp), allocatable :: neutral_return_correction(:) real(dp), allocatable :: neutral_return_weight_scale(:) real(dp), allocatable :: neutral_return_unresolved_fraction(:) real(dp), allocatable :: fixed_absorbed_target_charge(:) real(dp), allocatable :: fixed_absorbed_weight_scale(:) real(dp), allocatable :: fixed_emission_target_charge(:) real(dp), allocatable :: fixed_emission_weight_scale(:) real(dp), allocatable :: fixed_escape_target_charge(:) real(dp), allocatable :: fixed_escape_correction(:) real(dp), allocatable :: fixed_current_correction(:) integer(i64), allocatable :: injected_count(:) integer(i64), allocatable :: emitted_count(:) integer(i64), allocatable :: absorbed_count(:) integer(i64), allocatable :: escaped_count(:) integer(i64), allocatable :: discarded_unresolved_count(:) contains procedure :: init => init_charge_ledger procedure :: reset => reset_charge_ledger procedure :: residual => charge_ledger_residual procedure :: discarded_unresolved_abs procedure :: has_unresolved_discard end type charge_ledger_type