![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
P3M solver. More...
#include <p3m.hpp>
Inheritance diagram for CoulombP3M:
Collaboration diagram for CoulombP3M:Public Attributes | |
| P3MParameters const & | p3m_params |
Public Attributes inherited from Coulomb::Actor< CoulombP3M > | |
| double | prefactor |
| Electrostatics prefactor. | |
| double | charge_neutrality_tolerance |
| Relative tolerance for the charge excess during neutrality checks. | |
Protected Member Functions | |
| virtual void | calc_influence_function_force ()=0 |
| virtual void | calc_influence_function_energy ()=0 |
| void | sanity_checks_boxl () const |
| Checks for correctness of the k-space cutoff. | |
| void | sanity_checks_periodicity () const |
| void | sanity_checks_cell_structure () const |
| virtual void | scaleby_box_l ()=0 |
Protected Member Functions inherited from System::Leaf< Class > | |
| auto & | get_system () |
| auto & | get_system () const |
Additional Inherited Members | |
Static Public Attributes inherited from Coulomb::Actor< CoulombP3M > | |
| static auto constexpr | charge_neutrality_tolerance_default |
Protected Attributes inherited from System::Leaf< Class > | |
| std::weak_ptr< System > | m_system |
|
inline |
|
virtualdefault |
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Compute the k-space part of forces.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
|
pure virtual |
Assign a single charge into the current charge grid.
| [in] | q | Particle charge |
| [in] | real_pos | Particle position in real space |
| [in] | skip_cache | Skip interpolation weights caching. |
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Referenced by charge_assign().
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Assign the physical charges using the tabulated charge assignment function.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Count the number of charged particles and calculate the sum of the squared charges.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Referenced by modify_p3m_sums().
Recalculate all derived parameters.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Referenced by on_cell_structure_change().
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Compute the k-space part of energies.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
|
pure virtual |
Compute the k-space part of the pressure tensor.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
|
inline |
Recalculate all box-length-dependent parameters.
Definition at line 72 of file p3m.hpp.
References scaleby_box_l().
|
inline |
Definition at line 75 of file p3m.hpp.
References init(), and sanity_checks_cell_structure().
|
inline |
Definition at line 74 of file p3m.hpp.
References sanity_checks_periodicity().
Calculate real-space contribution of Coulomb pair energy.
Definition at line 167 of file p3m.hpp.
References P3MParameters::alpha, Utils::AS_erfc_part(), p3m_params, Coulomb::Actor< CoulombP3M >::prefactor, P3MParameters::r_cut, and stream.
|
inline |
Calculate real-space contribution of p3m Coulomb pair forces.
Definition at line 145 of file p3m.hpp.
References P3MParameters::alpha, Utils::AS_erfc_part(), p3m_params, Coulomb::Actor< CoulombP3M >::prefactor, P3MParameters::r_cut, and stream.
Referenced by ForcesKernel::operator()().
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Referenced by charge_assign().
|
inline |
Definition at line 79 of file p3m.hpp.
References sanity_checks_boxl(), sanity_checks_cell_structure(), Coulomb::Actor< CoulombP3M >::sanity_checks_charge_neutrality(), and sanity_checks_periodicity().
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::on_activation().
|
protected |
Checks for correctness of the k-space cutoff.
Definition at line 1107 of file p3m_heffte.impl.hpp.
References P3MParameters::cao_cut, P3MParameters::epsilon, System::Leaf< Class >::get_system(), P3MParameters::mesh, P3M_EPSILON_METALLIC, p3m_params, and stream.
Referenced by sanity_checks().
|
protected |
Definition at line 1146 of file p3m_heffte.impl.hpp.
References communicator, System::Leaf< Class >::get_system(), HYBRID, REGULAR, and stream.
Referenced by on_cell_structure_change(), and sanity_checks().
|
protected |
Definition at line 1138 of file p3m_heffte.impl.hpp.
References System::Leaf< Class >::get_system(), and stream.
Referenced by on_periodicity_change(), and sanity_checks().
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
Referenced by on_boxl_change().
Tune P3M parameters to desired accuracy.
The parameters mesh, cao, r_cut_iL and alpha_L are tuned to obtain the target accuracy in optimal time. These parameters are stored in the p3m_params object.
The function utilizes the analytic expression of the error estimate for the P3M method in [23] (eq. (8.23)) in order to obtain the rms error in the force for a system of N randomly distributed particles in a cubic box. For the real space error the estimate of Kolafa/Perram is used.
Parameter ranges if not given explicitly in the constructor:
mesh explores the range 0-512 (biased toward values less than 128)cao explores all possible valuesalpha_L is tuned for each tuple (r_cut_iL, mesh, cao) and calculated assuming that the error contributions of real and reciprocal space should be equalAfter checking if the total error lies below the target accuracy, the time needed for one force calculation is measured. Parameters that minimize the runtime are kept.
The function is based on routines of the program HE_Q.cpp written by M. Deserno.
Implemented in CoulombP3MHeffte< FloatType, Architecture, FFTConfig >.
| P3MParameters const& CoulombP3M::p3m_params |
Definition at line 56 of file p3m.hpp.
Referenced by pair_energy(), pair_force(), and sanity_checks_boxl().