classes_des_real_pair.f90 Source File

This File Depends On

sourcefile~~classes_des_real_pair.f90~~EfferentGraph sourcefile~classes_des_real_pair.f90 classes_des_real_pair.f90 sourcefile~procedures_box_size.f90 procedures_box_size.f90 sourcefile~procedures_box_size.f90->sourcefile~classes_des_real_pair.f90 sourcefile~types_potential_domain.f90 types_potential_domain.f90 sourcefile~types_potential_domain.f90->sourcefile~classes_des_real_pair.f90 sourcefile~procedures_checks.f90 procedures_checks.f90 sourcefile~types_potential_domain.f90->sourcefile~procedures_checks.f90 sourcefile~types_potential_domain_selector.f90 types_potential_domain_selector.f90 sourcefile~types_potential_domain_selector.f90->sourcefile~classes_des_real_pair.f90 sourcefile~types_potential_domain_selector.f90->sourcefile~procedures_checks.f90 sourcefile~procedures_dipolar_interactions_micro.f90 procedures_dipolar_interactions_micro.f90 sourcefile~procedures_dipolar_interactions_micro.f90->sourcefile~classes_des_real_pair.f90 sourcefile~classes_des_convergence_parameter.f90 classes_des_convergence_parameter.f90 sourcefile~classes_des_convergence_parameter.f90->sourcefile~classes_des_real_pair.f90 sourcefile~procedures_checks.f90->sourcefile~classes_des_real_pair.f90 sourcefile~procedures_checks.f90->sourcefile~classes_des_convergence_parameter.f90 sourcefile~classes_permittivity.f90 classes_permittivity.f90 sourcefile~procedures_checks.f90->sourcefile~classes_permittivity.f90 sourcefile~classes_periodic_box.f90 classes_periodic_box.f90 sourcefile~procedures_checks.f90->sourcefile~classes_periodic_box.f90 sourcefile~classes_box_size_memento.f90 classes_box_size_memento.f90 sourcefile~classes_box_size_memento.f90->sourcefile~classes_des_real_pair.f90 sourcefile~data_constants.f90 data_constants.f90 sourcefile~data_constants.f90->sourcefile~classes_des_real_pair.f90 sourcefile~data_constants.f90->sourcefile~procedures_dipolar_interactions_micro.f90 sourcefile~data_constants.f90->sourcefile~procedures_checks.f90 sourcefile~data_constants.f90->sourcefile~classes_box_size_memento.f90 sourcefile~data_constants.f90->sourcefile~classes_periodic_box.f90 sourcefile~procedures_errors.f90 procedures_errors.f90 sourcefile~procedures_errors.f90->sourcefile~classes_des_real_pair.f90 sourcefile~procedures_errors.f90->sourcefile~procedures_checks.f90 sourcefile~procedures_errors.f90->sourcefile~classes_periodic_box.f90 sourcefile~classes_permittivity.f90->sourcefile~classes_des_real_pair.f90 sourcefile~classes_number_to_string.f90 classes_number_to_string.f90 sourcefile~classes_number_to_string.f90->sourcefile~procedures_checks.f90 sourcefile~data_strings.f90 data_strings.f90 sourcefile~data_strings.f90->sourcefile~classes_number_to_string.f90 sourcefile~classes_periodic_box.f90->sourcefile~classes_box_size_memento.f90
Help

Files Dependent On This One

sourcefile~~classes_des_real_pair.f90~~AfferentGraph sourcefile~classes_des_real_pair.f90 classes_des_real_pair.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90 types_dipolar_interactions_static_wrapper.f90 sourcefile~classes_des_real_pair.f90->sourcefile~types_dipolar_interactions_static_wrapper.f90 sourcefile~classes_dipolar_interactions_facade.f90 classes_dipolar_interactions_facade.f90 sourcefile~classes_des_real_pair.f90->sourcefile~classes_dipolar_interactions_facade.f90 sourcefile~procedures_des_real_component_factory.f90 procedures_des_real_component_factory.f90 sourcefile~classes_des_real_pair.f90->sourcefile~procedures_des_real_component_factory.f90 sourcefile~classes_des_real_component.f90 classes_des_real_component.f90 sourcefile~classes_des_real_pair.f90->sourcefile~classes_des_real_component.f90 sourcefile~procedures_des_real_pair_factory.f90 procedures_des_real_pair_factory.f90 sourcefile~classes_des_real_pair.f90->sourcefile~procedures_des_real_pair_factory.f90 sourcefile~procedures_dipolar_interactions_resetter.f90 procedures_dipolar_interactions_resetter.f90 sourcefile~classes_des_real_pair.f90->sourcefile~procedures_dipolar_interactions_resetter.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_dipolar_interactions_facade.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~procedures_dipolar_interactions_resetter.f90 sourcefile~classes_box_particle_exchange.f90 classes_box_particle_exchange.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_box_particle_exchange.f90 sourcefile~procedures_dipolar_interactions_facades_factory.f90 procedures_dipolar_interactions_facades_factory.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~procedures_dipolar_interactions_facades_factory.f90 sourcefile~classes_boxes_particles_swap.f90 classes_boxes_particles_swap.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_boxes_particles_swap.f90 sourcefile~procedures_transmutation_updaters.f90 procedures_transmutation_updaters.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~procedures_transmutation_updaters.f90 sourcefile~classes_box_particles_swap.f90 classes_box_particles_swap.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_box_particles_swap.f90 sourcefile~procedures_des_reci_visitor_factory.f90 procedures_des_reci_visitor_factory.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~procedures_des_reci_visitor_factory.f90 sourcefile~types_physical_model_wrapper.f90 types_physical_model_wrapper.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~types_physical_model_wrapper.f90 sourcefile~procedures_dipolar_interactions_factory.f90 procedures_dipolar_interactions_factory.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~procedures_dipolar_interactions_factory.f90 sourcefile~procedures_exchange_updaters.f90 procedures_exchange_updaters.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~procedures_exchange_updaters.f90 sourcefile~classes_boxes_volume_exchange.f90 classes_boxes_volume_exchange.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_boxes_volume_exchange.f90 sourcefile~procedures_dlc_visitor_factory.f90 procedures_dlc_visitor_factory.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~procedures_dlc_visitor_factory.f90 sourcefile~classes_box_particle_move.f90 classes_box_particle_move.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_box_particle_move.f90 sourcefile~classes_volume_change_method.f90 classes_volume_change_method.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_volume_change_method.f90 sourcefile~classes_box_volume_change.f90 classes_box_volume_change.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_box_volume_change.f90 sourcefile~classes_boxes_particle_teleportation.f90 classes_boxes_particle_teleportation.f90 sourcefile~types_dipolar_interactions_static_wrapper.f90->sourcefile~classes_boxes_particle_teleportation.f90 sourcefile~classes_dipolar_interactions_facade.f90->sourcefile~procedures_dipolar_interactions_facades_factory.f90 sourcefile~classes_dipolar_interactions_facade.f90->sourcefile~types_physical_model_wrapper.f90 sourcefile~classes_dipolar_interactions_facade.f90->sourcefile~classes_boxes_volume_exchange.f90 sourcefile~classes_dipolar_interactions_facade.f90->sourcefile~classes_volume_change_method.f90 sourcefile~classes_dipolar_interactions_facade.f90->sourcefile~classes_box_volume_change.f90 sourcefile~classes_des_real_component.f90->sourcefile~procedures_des_real_component_factory.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90 types_dipolar_interactions_dynamic_wrapper.f90 sourcefile~classes_des_real_component.f90->sourcefile~types_dipolar_interactions_dynamic_wrapper.f90 sourcefile~procedures_dipolar_interactions_visitor.f90 procedures_dipolar_interactions_visitor.f90 sourcefile~classes_des_real_component.f90->sourcefile~procedures_dipolar_interactions_visitor.f90 sourcefile~procedures_dipolar_interactions_resetter.f90->sourcefile~classes_dipolar_interactions_facade.f90 sourcefile~procedures_plmc_resetter.f90 procedures_plmc_resetter.f90 sourcefile~procedures_dipolar_interactions_resetter.f90->sourcefile~procedures_plmc_resetter.f90 sourcefile~procedures_box_particle_exchange_factory.f90 procedures_box_particle_exchange_factory.f90 sourcefile~classes_box_particle_exchange.f90->sourcefile~procedures_box_particle_exchange_factory.f90 sourcefile~procedures_physical_model_factory.f90 procedures_physical_model_factory.f90 sourcefile~procedures_dipolar_interactions_facades_factory.f90->sourcefile~procedures_physical_model_factory.f90 sourcefile~procedures_boxes_particles_swap_factory.f90 procedures_boxes_particles_swap_factory.f90 sourcefile~classes_boxes_particles_swap.f90->sourcefile~procedures_boxes_particles_swap_factory.f90 sourcefile~procedures_transmutation_updaters.f90->sourcefile~classes_boxes_particles_swap.f90 sourcefile~procedures_transmutation_updaters.f90->sourcefile~classes_box_particles_swap.f90 sourcefile~procedures_box_particles_swap_factory.f90 procedures_box_particles_swap_factory.f90 sourcefile~classes_box_particles_swap.f90->sourcefile~procedures_box_particles_swap_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_box_particle_exchange_factory.f90 sourcefile~procedures_generating_algorithms_factory.f90 procedures_generating_algorithms_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~plmc_generate.f90 plmc_generate.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~plmc_generate.f90 sourcefile~procedures_markov_chain_generator_factory.f90 procedures_markov_chain_generator_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_markov_chain_generator_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_physical_model_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_boxes_particles_swap_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_box_particles_swap_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_plmc_resetter.f90 sourcefile~procedures_plmc_visitor.f90 procedures_plmc_visitor.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_plmc_visitor.f90 sourcefile~procedures_markov_chain_explorer_factory.f90 procedures_markov_chain_explorer_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_markov_chain_explorer_factory.f90 sourcefile~procedures_boxes_volume_exchange_factory.f90 procedures_boxes_volume_exchange_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_boxes_volume_exchange_factory.f90 sourcefile~procedures_maximum_boxes_compression_explorer_factory.f90 procedures_maximum_boxes_compression_explorer_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_maximum_boxes_compression_explorer_factory.f90 sourcefile~procedures_boxes_particle_teleportation_factory.f90 procedures_boxes_particle_teleportation_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_boxes_particle_teleportation_factory.f90 sourcefile~procedures_volume_change_method_factory.f90 procedures_volume_change_method_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_volume_change_method_factory.f90 sourcefile~procedures_particle_insertion_method_factory.f90 procedures_particle_insertion_method_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_particle_insertion_method_factory.f90 sourcefile~procedures_box_volume_change_factory.f90 procedures_box_volume_change_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_box_volume_change_factory.f90 sourcefile~procedures_box_particle_move_factory.f90 procedures_box_particle_move_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_box_particle_move_factory.f90 sourcefile~procedures_dipolar_neighbourhoods_visitors_factory.f90 procedures_dipolar_neighbourhoods_visitors_factory.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~procedures_dipolar_neighbourhoods_visitors_factory.f90 sourcefile~plmc_explore.f90 plmc_explore.f90 sourcefile~types_physical_model_wrapper.f90->sourcefile~plmc_explore.f90 sourcefile~procedures_dipolar_interactions_factory.f90->sourcefile~classes_boxes_volume_exchange.f90 sourcefile~procedures_dipolar_interactions_factory.f90->sourcefile~classes_volume_change_method.f90 sourcefile~procedures_dipolar_interactions_factory.f90->sourcefile~classes_box_volume_change.f90 sourcefile~procedures_dipolar_interactions_factory.f90->sourcefile~procedures_physical_model_factory.f90 sourcefile~procedures_exchange_updaters.f90->sourcefile~classes_box_particle_exchange.f90 sourcefile~procedures_exchange_updaters.f90->sourcefile~classes_boxes_particle_teleportation.f90 sourcefile~classes_boxes_volume_exchange.f90->sourcefile~procedures_boxes_volume_exchange_factory.f90 sourcefile~classes_box_particle_move.f90->sourcefile~procedures_box_particle_move_factory.f90 sourcefile~classes_volume_change_method.f90->sourcefile~procedures_volume_change_method_factory.f90 sourcefile~types_markov_chain_explorer_wrapper.f90 types_markov_chain_explorer_wrapper.f90 sourcefile~classes_volume_change_method.f90->sourcefile~types_markov_chain_explorer_wrapper.f90 sourcefile~procedures_exploration_inquirers.f90 procedures_exploration_inquirers.f90 sourcefile~classes_volume_change_method.f90->sourcefile~procedures_exploration_inquirers.f90 sourcefile~classes_box_volume_change.f90->sourcefile~procedures_box_volume_change_factory.f90 sourcefile~classes_boxes_particle_teleportation.f90->sourcefile~procedures_boxes_particle_teleportation_factory.f90 sourcefile~procedures_box_particle_exchange_factory.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~procedures_generating_algorithms_factory.f90->sourcefile~plmc_generate.f90 sourcefile~procedures_generating_algorithms_factory.f90->sourcefile~procedures_markov_chain_generator_factory.f90 sourcefile~procedures_boxes_particles_swap_factory.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~procedures_box_particles_swap_factory.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~procedures_plmc_resetter.f90->sourcefile~plmc_generate.f90 sourcefile~procedures_plmc_resetter.f90->sourcefile~plmc_explore.f90 sourcefile~procedures_plmc_visitor.f90->sourcefile~plmc_generate.f90 sourcefile~procedures_plmc_visitor.f90->sourcefile~plmc_explore.f90 sourcefile~procedures_markov_chain_explorer_factory.f90->sourcefile~plmc_explore.f90 sourcefile~procedures_boxes_volume_exchange_factory.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~procedures_maximum_boxes_compression_explorer_factory.f90->sourcefile~procedures_markov_chain_explorer_factory.f90 sourcefile~procedures_boxes_particle_teleportation_factory.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~procedures_volume_change_method_factory.f90->sourcefile~procedures_markov_chain_explorer_factory.f90 sourcefile~procedures_particle_insertion_method_factory.f90->sourcefile~procedures_markov_chain_explorer_factory.f90 sourcefile~procedures_box_volume_change_factory.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~procedures_box_particle_move_factory.f90->sourcefile~procedures_generating_algorithms_factory.f90 sourcefile~procedures_dipolar_neighbourhoods_visitors_factory.f90->sourcefile~procedures_markov_chain_explorer_factory.f90 sourcefile~types_markov_chain_explorer_wrapper.f90->sourcefile~procedures_markov_chain_explorer_factory.f90 sourcefile~types_markov_chain_explorer_wrapper.f90->sourcefile~plmc_explore.f90 sourcefile~procedures_exploring_writers_factory.f90 procedures_exploring_writers_factory.f90 sourcefile~types_markov_chain_explorer_wrapper.f90->sourcefile~procedures_exploring_writers_factory.f90 sourcefile~procedures_exploration_inquirers.f90->sourcefile~procedures_dipolar_interactions_facades_factory.f90 sourcefile~procedures_exploration_inquirers.f90->sourcefile~procedures_markov_chain_explorer_factory.f90 sourcefile~procedures_exploration_inquirers.f90->sourcefile~plmc_explore.f90 sourcefile~procedures_exploration_inquirers.f90->sourcefile~procedures_exploring_writers_factory.f90 sourcefile~procedures_short_interactions_factory.f90 procedures_short_interactions_factory.f90 sourcefile~procedures_exploration_inquirers.f90->sourcefile~procedures_short_interactions_factory.f90 sourcefile~procedures_short_interactions_factory.f90->sourcefile~procedures_physical_model_factory.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~classes_dipolar_interactions_facade.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~classes_box_particle_exchange.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~procedures_dipolar_interactions_facades_factory.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~classes_boxes_particles_swap.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~classes_box_particles_swap.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~types_physical_model_wrapper.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~procedures_dipolar_interactions_factory.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~classes_box_particle_move.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~classes_boxes_particle_teleportation.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~procedures_dipolar_interactions_visitor.f90 sourcefile~procedures_exchange_visitors.f90 procedures_exchange_visitors.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~procedures_exchange_visitors.f90 sourcefile~classes_particle_insertion_method.f90 classes_particle_insertion_method.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~classes_particle_insertion_method.f90 sourcefile~procedures_transmutation_visitors.f90 procedures_transmutation_visitors.f90 sourcefile~types_dipolar_interactions_dynamic_wrapper.f90->sourcefile~procedures_transmutation_visitors.f90 sourcefile~procedures_dipolar_interactions_visitor.f90->sourcefile~classes_dipolar_interactions_facade.f90 sourcefile~procedures_dipolar_interactions_visitor.f90->sourcefile~classes_boxes_volume_exchange.f90 sourcefile~procedures_dipolar_interactions_visitor.f90->sourcefile~classes_volume_change_method.f90 sourcefile~procedures_dipolar_interactions_visitor.f90->sourcefile~classes_box_volume_change.f90 sourcefile~procedures_dipolar_interactions_visitor.f90->sourcefile~procedures_plmc_visitor.f90 sourcefile~procedures_exchange_visitors.f90->sourcefile~classes_box_particle_exchange.f90 sourcefile~procedures_exchange_visitors.f90->sourcefile~classes_boxes_particle_teleportation.f90 sourcefile~classes_particle_insertion_method.f90->sourcefile~procedures_particle_insertion_method_factory.f90 sourcefile~classes_particle_insertion_method.f90->sourcefile~types_markov_chain_explorer_wrapper.f90 sourcefile~classes_particle_insertion_method.f90->sourcefile~procedures_exploration_inquirers.f90 sourcefile~procedures_transmutation_visitors.f90->sourcefile~classes_boxes_particles_swap.f90 sourcefile~procedures_transmutation_visitors.f90->sourcefile~classes_box_particles_swap.f90
Help


Source Code

module classes_des_real_pair

use, intrinsic :: iso_fortran_env, only: DP => REAL64
use data_constants, only: num_dimensions, PI
use procedures_errors, only: error_exit
use procedures_checks, only: check_positive, check_potential_domain
use classes_box_size_memento, only: Abstract_Box_Size_Memento
use procedures_box_size, only: box_size_edge => edge
use classes_permittivity, only: Abstract_Permittivity
use procedures_dipolar_interactions_micro, only: des_real_B, des_real_C
use types_potential_domain, only: Concrete_Potential_Domain
use types_potential_domain_selector, only: Concrete_Potential_Domain_Selector
use classes_des_convergence_parameter, only: Abstract_DES_Convergence_Parameter

implicit none

private

    type, abstract, public :: Abstract_DES_Real_Pair
    private
        class(Abstract_Box_Size_Memento), pointer :: box_size_memento => null()
        type(Concrete_Potential_Domain) :: domain
        real(DP) :: coulomb = 0._DP
        real(DP) :: alpha_x_box_edge = 0._DP
    contains
        procedure(Abstract_construct), deferred :: construct
        procedure(Abstract_destroy), deferred :: destroy
        procedure :: target => Abstract_target
        procedure(Abstract_reset), deferred :: reset
        procedure :: meet => Abstract_meet
        procedure(Abstract_expression), private, deferred :: expression
    end type Abstract_DES_Real_Pair

    abstract interface

        subroutine Abstract_construct(this, box_size_memento, permittivity, alpha, domain)
        import :: Abstract_Box_Size_Memento, Abstract_Permittivity, Concrete_Potential_Domain, &
            Abstract_DES_Convergence_Parameter, Abstract_DES_Real_Pair
            class(Abstract_DES_Real_Pair), intent(out) :: this
            class(Abstract_Box_Size_Memento), intent(in) :: box_size_memento
            class(Abstract_Permittivity), intent(in) :: permittivity
            class(Abstract_DES_Convergence_Parameter), intent(in) :: alpha
            type(Concrete_Potential_Domain), intent(in) :: domain
        end subroutine Abstract_construct

        subroutine Abstract_destroy(this)
        import :: Abstract_DES_Real_Pair
            class(Abstract_DES_Real_Pair), intent(inout) :: this
        end subroutine Abstract_destroy

        subroutine Abstract_reset(this)
        import :: Abstract_DES_Real_Pair
            class(Abstract_DES_Real_Pair), intent(inout) :: this
        end subroutine Abstract_reset

        !> \[ r \mapsto \frac{1}{4\pi\epsilon} [B(r), C(r)] \]
        pure function Abstract_expression(this, distance) result(expression)
        import :: DP, Abstract_DES_Real_Pair
            real(DP), dimension(2) :: expression
            class(Abstract_DES_Real_Pair), intent(in) :: this
            real(DP), intent(in) :: distance !! \( r \)
        end function Abstract_expression

    end interface

    type, extends(Abstract_DES_Real_Pair), public :: Tabulated_DES_Real_Pair
    private
        real(DP), dimension(:, :), allocatable :: tabulation
    contains
        procedure :: construct => Tabulated_construct
        procedure :: destroy => Tabulated_destroy
        procedure :: reset => Tabulated_reset
        procedure, private :: set_domain => Tabulated_set_domain
        procedure, private :: create_tabulation => Tabulated_create_tabulation
        procedure, private :: expression => Tabulated_expression
    end type Tabulated_DES_Real_Pair

    type, extends(Abstract_DES_Real_Pair), public :: Raw_DES_Real_Pair
    private
        real(DP) :: alpha = 0._DP
        real(DP) :: expression_domain_max(2) = 0._DP
    contains
        procedure :: construct => Raw_construct
        procedure :: destroy => Raw_destroy
        procedure :: reset => Raw_reset
        procedure, private :: set_domain => Raw_set_domain
        procedure, private :: expression => Raw_expression
    end type Raw_DES_Real_Pair

    type, extends(Abstract_DES_Real_Pair), public :: Null_DES_Real_Pair
    contains
        procedure :: construct => Null_construct
        procedure :: destroy => Null_destroy
        procedure :: target => Null_target
        procedure :: reset => Null_reset
        procedure :: meet => Null_meet
        procedure, private :: expression => Null_expression
    end type Null_DES_Real_Pair

contains

!implementation Abstract_DES_Real_Pair

    subroutine Abstract_target(this, box_size_memento)
        class(Abstract_DES_Real_Pair), intent(inout) :: this
        class(Abstract_Box_Size_Memento), target, intent(in) :: box_size_memento

        this%box_size_memento => box_size_memento
    end subroutine Abstract_target

    !> \[
    !>      u(\vec{r}_{ij}, \vec{\mu}_i, \vec{\mu}_j) = \frac{1}{4\pi \epsilon}
    !>          \left[ (\vec{\mu}_i \cdot \vec{\mu}_j) B_\alpha(r_{ij}) -
    !>              (\vec{\mu}_i \cdot \vec{r}_{ij}) (\vec{\mu}_j \cdot \vec{r}_{ij})
    !>                  C_\alpha(r_{ij}) \right]
    !> \]
    !> cf. [[procedures_dipolar_interactions_micro:des_real_B]] &
    !> [[procedures_dipolar_interactions_micro:des_real_C]]
    pure real(DP) function Abstract_meet(this, vector_ij, moment_i, moment_j) result(energy)
        class(Abstract_DES_Real_Pair), intent(in) :: this
        real(DP), dimension(:), intent(in) :: vector_ij
        real(DP), dimension(:), intent(in) :: moment_i, moment_j

        real(DP) :: expression(2)

        expression = this%expression(norm2(vector_ij))
        energy = dot_product(moment_i, moment_j) * expression(1) - &
            dot_product(moment_i, vector_ij) * dot_product(moment_j, vector_ij) * expression(2)
    end function Abstract_meet

!end implementation Abstract_DES_Real_Pair

!implementation Tabulated_DES_Real_Pair

    !> @note create_tabulation() is delayed in reset()
    subroutine Tabulated_construct(this, box_size_memento, permittivity, alpha, domain)
        class(Tabulated_DES_Real_Pair), intent(out) :: this
        class(Abstract_Box_Size_Memento), intent(in) :: box_size_memento
        class(Abstract_Permittivity), intent(in) :: permittivity
        class(Abstract_DES_Convergence_Parameter), intent(in) :: alpha
        type(Concrete_Potential_Domain), intent(in) :: domain

        call this%target(box_size_memento)
        this%coulomb = 1._DP / (4._DP*PI * permittivity%get())
        this%alpha_x_box_edge = alpha%get_times_box_edge()
        call this%set_domain(domain)
    end subroutine Tabulated_construct

    !> @note Since box_size_memento may not be initialised, max_over_box_edge won't be checked now.
    subroutine Tabulated_set_domain(this, domain)
        class(Tabulated_DES_Real_Pair), intent(inout) :: this
        type(Concrete_Potential_Domain), intent(in) :: domain

        type(Concrete_Potential_Domain_Selector) :: selector

        this%domain%min = domain%min
        this%domain%max_over_box_edge = domain%max_over_box_edge
        this%domain%max = this%domain%max_over_box_edge * box_size_edge(this%box_size_memento%get())
        this%domain%delta = domain%delta
        selector%check_max = .false.
        selector%check_max_over_box_edge = .true.
        selector%check_delta = .true.
        call check_potential_domain("Tabulated_DES_Real_Pair: set_domain", this%domain, selector)
    end subroutine Tabulated_set_domain

    pure subroutine Tabulated_create_tabulation(this)
        class(Tabulated_DES_Real_Pair), intent(inout) :: this

        real(DP) :: alpha, distance_i
        integer :: i_min, i_max, i_distance

        i_min = int(this%domain%min / this%domain%delta)
        i_max = int(this%domain%max / this%domain%delta) + 1
        allocate(this%tabulation(i_min:i_max, 2))
        alpha = this%alpha_x_box_edge / box_size_edge(this%box_size_memento%get())
        do i_distance = i_min, i_max
            distance_i = real(i_distance, DP) * this%domain%delta
            this%tabulation(i_distance, 1) = des_real_B(alpha, distance_i)
            this%tabulation(i_distance, 2) = des_real_C(alpha, distance_i)
        end do
        this%tabulation(:, 1) = this%coulomb * (this%tabulation(:, 1) - this%tabulation(i_max, 1))
        this%tabulation(:, 2) = this%coulomb * (this%tabulation(:, 2) - this%tabulation(i_max, 2))
    end subroutine Tabulated_create_tabulation

    subroutine Tabulated_destroy(this)
        class(Tabulated_DES_Real_Pair), intent(inout) :: this

        if (allocated(this%tabulation)) deallocate(this%tabulation)
        this%box_size_memento => null()
    end subroutine Tabulated_destroy

    subroutine Tabulated_reset(this)
        class(Tabulated_DES_Real_Pair), intent(inout) :: this

        this%domain%max = this%domain%max_over_box_edge * box_size_edge(this%box_size_memento%get())
        if (this%domain%min > this%domain%max) then
            call error_exit("Tabulated_DES_Real_Pair: reset: domain: min > max.")
        end if
        if (allocated(this%tabulation)) deallocate(this%tabulation)
        call this%create_tabulation()
    end subroutine Tabulated_reset

    !> Linear interpolation
    pure function Tabulated_expression(this, distance) result(expression)
        real(DP) :: expression(2)
        class(Tabulated_DES_Real_Pair), intent(in) :: this
        real(DP), intent(in) :: distance

        integer :: i_distance
        real(DP) :: distance_i

        if (distance < this%domain%max) then
            i_distance = int(distance/this%domain%delta)
            distance_i = real(i_distance, DP) * this%domain%delta
            expression = this%tabulation(i_distance, :) + &
                (distance - distance_i) * &
                (this%tabulation(i_distance + 1, :) - this%tabulation(i_distance, :)) / &
                this%domain%delta
        else
            expression = 0._DP
        end if
    end function Tabulated_expression

!end implementation Tabulated_DES_Real_Pair

!implementation Raw_DES_Real_Pair

    !> @note this%alpha and this%expression_domain_max will be set later, cf.
    !> [[classes_des_real_pair:Raw_reset]].
    subroutine Raw_construct(this, box_size_memento, permittivity, alpha, domain)
        class(Raw_DES_Real_Pair), intent(out) :: this
        class(Abstract_Box_Size_Memento), intent(in) :: box_size_memento
        class(Abstract_Permittivity), intent(in) :: permittivity
        class(Abstract_DES_Convergence_Parameter), intent(in) :: alpha
        type(Concrete_Potential_Domain), intent(in) :: domain

        call this%target(box_size_memento)
        this%coulomb = 1._DP / (4._DP * PI * permittivity%get())
        this%alpha_x_box_edge = alpha%get_times_box_edge()
        call this%set_domain(domain)
    end subroutine Raw_construct

    !> note cf. [[classes_des_real_pair:Tabulated_set_domain]]
    subroutine Raw_set_domain(this, domain)
        class(Raw_DES_Real_Pair), intent(inout) :: this
        type(Concrete_Potential_Domain), intent(in) :: domain

        type(Concrete_Potential_Domain_Selector) :: selector

        this%domain%min = domain%min
        this%domain%max_over_box_edge = domain%max_over_box_edge
        this%domain%max = this%domain%max_over_box_edge * box_size_edge(this%box_size_memento%get())
        this%domain%delta = 0._DP
        selector%check_max = .false.
        selector%check_max_over_box_edge = .true.
        selector%check_delta = .false.
        call check_potential_domain("Raw_DES_Real_Pair: set_domain", this%domain, selector)
    end subroutine Raw_set_domain

    subroutine Raw_destroy(this)
        class(Raw_DES_Real_Pair), intent(inout) :: this

        this%box_size_memento => null()
    end subroutine Raw_destroy

    subroutine Raw_reset(this)
        class(Raw_DES_Real_Pair), intent(inout) :: this

        this%domain%max = this%domain%max_over_box_edge * box_size_edge(this%box_size_memento%get())
        if (this%domain%min > this%domain%max) then
            call error_exit("Raw_DES_Real_Pair: reset: domain: min > max.")
        end if
        this%alpha = this%alpha_x_box_edge / box_size_edge(this%box_size_memento%get())
        this%expression_domain_max =  [des_real_B(this%alpha, this%domain%max), &
            des_real_C(this%alpha, this%domain%max)]
    end subroutine Raw_reset

    pure function Raw_expression(this, distance) result(expression)
        real(DP) :: expression(2)
        class(Raw_DES_Real_Pair), intent(in) :: this
        real(DP), intent(in) :: distance

        if (distance < this%domain%max) then
            expression = [des_real_B(this%alpha, distance), des_real_C(this%alpha, distance)]
            expression = this%coulomb * (expression - this%expression_domain_max)
        else
            expression = 0._DP
        end if
    end function Raw_expression

!end implementation Raw_DES_Real_Pair

!implementation Null_DES_Real_Pair

    subroutine Null_construct(this, box_size_memento, permittivity, alpha, domain)
        class(Null_DES_Real_Pair), intent(out) :: this
        class(Abstract_Box_Size_Memento), intent(in) :: box_size_memento
        class(Abstract_Permittivity), intent(in) :: permittivity
        class(Abstract_DES_Convergence_Parameter), intent(in) :: alpha
        type(Concrete_Potential_Domain), intent(in) :: domain
    end subroutine Null_construct

    subroutine Null_destroy(this)
        class(Null_DES_Real_Pair), intent(inout) :: this
    end subroutine Null_destroy

    subroutine Null_target(this, box_size_memento)
        class(Null_DES_Real_Pair), intent(inout) :: this
        class(Abstract_Box_Size_Memento), target, intent(in) :: box_size_memento
    end subroutine Null_target

    subroutine Null_reset(this)
        class(Null_DES_Real_Pair), intent(inout) :: this
    end subroutine Null_reset

    pure function Null_expression(this, distance) result(expression)
        real(DP) :: expression(2)
        class(Null_DES_Real_Pair), intent(in) :: this
        real(DP), intent(in) :: distance
        expression = 0._DP
    end function Null_expression

    pure real(DP) function Null_meet(this, vector_ij, moment_i, moment_j) result(energy)
        class(Null_DES_Real_Pair), intent(in) :: this
        real(DP), dimension(:), intent(in) :: vector_ij
        real(DP), dimension(:), intent(in) :: moment_i, moment_j
        energy = 0._DP
    end function Null_meet

!end implementation Null_DES_Real_Pair

end module classes_des_real_pair

classes_average_num_particles.f90 classes_beta_pressure.f90 classes_beta_pressure_excess.f90 classes_box_particle_exchange.f90 classes_box_particle_move.f90 classes_box_particles_swap.f90 classes_box_size_checker.f90 classes_box_size_memento.f90 classes_box_volume_change.f90 classes_boxes_particle_teleportation.f90 classes_boxes_particles_swap.f90 classes_boxes_volume_exchange.f90 classes_changed_box_size.f90 classes_changed_box_size_ratio.f90 classes_changes_success_writer.f90 classes_complete_coordinates_reader.f90 classes_complete_coordinates_writer.f90 classes_component_chemical_potential.f90 classes_component_coordinates.f90 classes_component_coordinates_reader.f90 classes_component_coordinates_writer.f90 classes_component_dipole_moments.f90 classes_coordinates.f90 classes_coordinates_copier.f90 classes_density_explorer.f90 classes_des_convergence_parameter.f90 classes_des_real_component.f90 classes_des_real_pair.f90 classes_des_reci_structure.f90 classes_des_reci_visitor.f90 classes_des_reci_weight.f90 classes_des_self_component.f90 classes_des_surf_mixture.f90 classes_dipolar_interactions_facade.f90 classes_dipolar_neighbourhood.f90 classes_dipolar_neighbourhoods_visitor.f90 classes_dirac_distribution_plus.f90 classes_directed_graph_writer.f90 classes_dlc_structures.f90 classes_dlc_visitor.f90 classes_dlc_weight.f90 classes_exchanged_boxes_size.f90 classes_external_field.f90 classes_field_expression.f90 classes_floor_penetration.f90 classes_generating_algorithm.f90 classes_hard_contact.f90 classes_hetero_couples.f90 classes_line_writer.f90 classes_maximum_box_compression.f90 classes_maximum_box_compression_explorer.f90 classes_min_distance.f90 classes_mixture_total_moment.f90 classes_move_tuner.f90 classes_moved_coordinates.f90 classes_neighbour_cells.f90 classes_num_particles.f90 classes_number_to_string.f90 classes_pair_potential.f90 classes_parallelepiped_domain.f90 classes_particle_insertion_method.f90 classes_periodic_box.f90 classes_permittivity.f90 classes_plmc_propagator.f90 classes_potential_expression.f90 classes_radial_explorer.f90 classes_random_coordinates.f90 classes_random_orientation.f90 classes_random_position.f90 classes_real_writer.f90 classes_reciprocal_lattice.f90 classes_rectangle_writer.f90 classes_rotated_orientations.f90 classes_short_pairs_visitor.f90 classes_structure_factor.f90 classes_structure_visitor.f90 classes_temperature.f90 classes_tower_sampler.f90 classes_translated_positions.f90 classes_triangle_writer.f90 classes_tunable_move.f90 classes_visitable_cells.f90 classes_visitable_cells_memento.f90 classes_visitable_list.f90 classes_visitable_walls.f90 classes_volume_change_method.f90 classes_walls_visitor.f90 data_cells.f90 data_constants.f90 data_input_prefixes.f90 data_output_objects.f90 data_strings.f90 density.f90 module_changes_success.f90 module_list_node.f90 module_move_tuning.f90 plmc_explore.f90 plmc_generate.f90 procedures_average_nums_particles_factory.f90 procedures_beta_pressure_factory.f90 procedures_beta_pressures_excess_factory.f90 procedures_box_particle_exchange_factory.f90 procedures_box_particle_move_factory.f90 procedures_box_particles_swap_factory.f90 procedures_box_size.f90 procedures_box_size_memento_factory.f90 procedures_box_volume_change_factory.f90 procedures_boxes_particle_teleportation_factory.f90 procedures_boxes_particles_swap_factory.f90 procedures_boxes_size_checker_factory.f90 procedures_boxes_volume_exchange_factory.f90 procedures_cells_memento.f90 procedures_centered_block_micro.f90 procedures_changed_boxes_size_factory.f90 procedures_changed_boxes_size_ratio_factory.f90 procedures_changes_component_factory.f90 procedures_changes_factory.f90 procedures_changes_properties.f90 procedures_changes_success_writer_factory.f90 procedures_checks.f90 procedures_command_arguments.f90 procedures_complete_coordinates_reader.f90 procedures_complete_coordinates_reader_factory.f90 procedures_complete_coordinates_writer_factory.f90 procedures_component_chemical_potential_factory.f90 procedures_component_coordinates_factory.f90 procedures_component_coordinates_reader_factory.f90 procedures_component_coordinates_writer_factory.f90 procedures_component_dipole_moments_factory.f90 procedures_component_factory.f90 procedures_coordinates_copier_factory.f90 procedures_coordinates_micro.f90 procedures_coordinates_reader.f90 procedures_density_explorer_factory.f90 procedures_des_convergence_parameter_factory.f90 procedures_des_real_component_factory.f90 procedures_des_real_pair_factory.f90 procedures_des_reci_structure_factory.f90 procedures_des_reci_visitor_factory.f90 procedures_des_reci_weight_factory.f90 procedures_des_surf_mixture_factory.f90 procedures_dipolar_interactions_facades_factory.f90 procedures_dipolar_interactions_factory.f90 procedures_dipolar_interactions_micro.f90 procedures_dipolar_interactions_resetter.f90 procedures_dipolar_interactions_visitor.f90 procedures_dipolar_neighbourhoods_factory.f90 procedures_dipolar_neighbourhoods_visitors_factory.f90 procedures_dipoles_field_interaction.f90 procedures_dirac_distribution_plus.f90 procedures_directed_graph_writer_factory.f90 procedures_dlc_structures_factory.f90 procedures_dlc_visitor_factory.f90 procedures_dlc_weight_factory.f90 procedures_elementary_geometry.f90 procedures_elementary_statistics.f90 procedures_energies_writers_factory.f90 procedures_environment_factory.f90 procedures_environment_inquirers.f90 procedures_errors.f90 procedures_exchange_updaters.f90 procedures_exchange_visitors.f90 procedures_exchanged_boxes_size_factory.f90 procedures_exploration_inquirers.f90 procedures_exploring_observables_factory.f90 procedures_exploring_writers_factory.f90 procedures_external_fields_factory.f90 procedures_field_expression_factory.f90 procedures_field_expression_micro.f90 procedures_floor_penetration_factory.f90 procedures_generating_algorithms_factory.f90 procedures_generating_observables_factory.f90 procedures_generating_writers_factory.f90 procedures_hard_contact_factory.f90 procedures_hetero_couples_factory.f90 procedures_json_data_factory.f90 procedures_json_reports_factory.f90 procedures_line_writer_factory.f90 procedures_logical_factory.f90 procedures_markov_chain_explorer_factory.f90 procedures_markov_chain_generator_factory.f90 procedures_maximum_box_compression_factory.f90 procedures_maximum_boxes_compression_explorer_factory.f90 procedures_metropolis_algorithm.f90 procedures_min_distance_factory.f90 procedures_mixture_inquirers.f90 procedures_mixture_properties.f90 procedures_mixture_total_moments_factory.f90 procedures_move_tuner_factory.f90 procedures_moved_coordinates_factory.f90 procedures_neighbour_cells_factory.f90 procedures_num_particles_factory.f90 procedures_observables_changes_factory.f90 procedures_observables_energies_factory.f90 procedures_observables_factory.f90 procedures_pair_potential_factory.f90 procedures_parallelepiped_domain_macro.f90 procedures_parallelepiped_domain_micro.f90 procedures_parallelepiped_domains_factory.f90 procedures_particle_insertion_method_factory.f90 procedures_periodic_boxes_factory.f90 procedures_permittivity_factory.f90 procedures_physical_model_factory.f90 procedures_plmc_help.f90 procedures_plmc_iterations.f90 procedures_plmc_propagator_factory.f90 procedures_plmc_resetter.f90 procedures_plmc_visitor.f90 procedures_plmc_writer.f90 procedures_potential_expression_factory.f90 procedures_property_inquirers.f90 procedures_radial_explorer_factory.f90 procedures_random_coordinates_factory.f90 procedures_random_number.f90 procedures_random_seed_factory.f90 procedures_readers_factory.f90 procedures_real_writer_factory.f90 procedures_reals_factory.f90 procedures_reciprocal_lattices_factory.f90 procedures_rectangle_writer_factory.f90 procedures_selectors_resetters.f90 procedures_short_interactions_factory.f90 procedures_short_interactions_inquirers.f90 procedures_short_interactions_resetter.f90 procedures_short_interactions_visitor.f90 procedures_short_pairs_visitors_factory.f90 procedures_string_factory.f90 procedures_temperature_factory.f90 procedures_tower_sampler_factory.f90 procedures_transmutation_updaters.f90 procedures_transmutation_visitors.f90 procedures_triangle_observables.f90 procedures_triangle_writer_factory.f90 procedures_visit_condition.f90 procedures_visitable_cells_factory.f90 procedures_visitable_cells_memento_factory.f90 procedures_visitable_list_factory.f90 procedures_visitable_walls_factory.f90 procedures_volume_change_method_factory.f90 procedures_walls_visitors_factory.f90 procedures_writers_inquirers.f90 radial.f90 types_cells_wrapper.f90 types_changes_component_wrapper.f90 types_changes_success_writer_selector.f90 types_changes_wrapper.f90 types_component_coordinates_reader_selector.f90 types_component_coordinates_writer_selector.f90 types_component_wrapper.f90 types_dipolar_interactions_dynamic_wrapper.f90 types_dipolar_interactions_static_wrapper.f90 types_energies_writers.f90 types_environment_wrapper.f90 types_exploring_io.f90 types_exploring_writers_wrapper.f90 types_generating_io.f90 types_generating_observables_wrapper.f90 types_generating_writers_wrapper.f90 types_json_report.f90 types_logical_wrapper.f90 types_markov_chain_explorer_wrapper.f90 types_markov_chain_generator_wrapper.f90 types_mixture_wrapper.f90 types_move_tuner_parameters.f90 types_observables_changes.f90 types_observables_energies.f90 types_particle_wrapper.f90 types_physical_model_wrapper.f90 types_potential_domain.f90 types_potential_domain_selector.f90 types_raw_coordinates.f90 types_readers_wrapper.f90 types_real_wrapper.f90 types_short_interactions_wrapper.f90 types_string_wrapper.f90