![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <p3m_heffte.hpp>
Inheritance diagram for CoulombP3MHeffte< FloatType, Architecture, FFTConfig >:
Collaboration diagram for CoulombP3MHeffte< FloatType, Architecture, FFTConfig >:Public Types | |
| using | CoulombP3MStateClass = CoulombP3MState< FloatType, FFTConfig > |
Public Attributes | |
| CoulombP3MStateClass & | p3m |
| Coulomb P3M parameters. | |
Public Attributes inherited from CoulombP3M | |
| 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 | |
| double | long_range_kernel (bool force_flag, bool energy_flag, ParticleRange const &particles) |
| Compute the k-space part of forces and energies. | |
| void | calc_influence_function_force () override |
| Calculate the optimal influence function of [23]. | |
| void | calc_influence_function_energy () override |
| Calculate the influence function optimized for the energy and the self energy correction. | |
| void | scaleby_box_l () override |
| void | init_cpu_kernels () |
| void | init_gpu_kernels () |
| void | add_long_range_forces_gpu (ParticleRange const &particles) |
| void | request_gpu () const |
Protected Member Functions inherited from CoulombP3M | |
| void | sanity_checks_boxl () const |
| Checks for correctness of the k-space cutoff. | |
| void | sanity_checks_periodicity () const |
| void | sanity_checks_cell_structure () const |
Protected Member Functions inherited from System::Leaf< Class > | |
| auto & | get_system () |
| auto & | get_system () const |
Protected Attributes | |
| std::shared_ptr< P3MGpuParams > | m_gpu_data = nullptr |
Protected Attributes inherited from System::Leaf< Class > | |
| std::weak_ptr< System > | m_system |
Additional Inherited Members | |
Static Public Attributes inherited from Coulomb::Actor< CoulombP3M > | |
| static auto constexpr | charge_neutrality_tolerance_default |
Definition at line 105 of file p3m_heffte.hpp.
| using CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::CoulombP3MStateClass = CoulombP3MState<FloatType, FFTConfig> |
Definition at line 108 of file p3m_heffte.hpp.
|
overridedefault |
|
inline |
Definition at line 130 of file p3m_heffte.hpp.
References CoulombP3MState< FloatType, FFTConfig >::init_labels(), CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::p3m, P3MStateCommon< FloatType >::params, Coulomb::Actor< CoulombP3M >::prefactor, Coulomb::Actor< CoulombP3M >::set_prefactor(), stream, TuningParameters::timings, and P3MParameters::tuning.
|
inlineoverridevirtual |
Implements CoulombP3M.
Definition at line 167 of file p3m_heffte.hpp.
References P3MParameters::epsilon, CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::p3m, P3M_EPSILON_METALLIC, and P3MStateCommon< FloatType >::params.
|
inlineoverridevirtual |
Implements CoulombP3M.
Definition at line 200 of file p3m_heffte.hpp.
References CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::add_long_range_forces_gpu(), CPU, CUDA, CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::long_range_kernel(), and stream.
|
protected |
Definition at line 1176 of file p3m_heffte.impl.hpp.
References CUDA, System::System::gpu, System::System::has_npt_enabled(), System::System::npt_add_virial_contribution(), p3m_gpu_add_farfield_force(), stream, and this_node.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::add_long_range_forces().
|
overridevirtual |
|
overrideprotectedvirtual |
Calculate the influence function optimized for the energy and the self energy correction.
Implements CoulombP3M.
Definition at line 182 of file p3m_heffte.impl.hpp.
References System::System::box_geo, grid_influence_function(), P3M_BRILLOUIN, and stream.
|
overrideprotectedvirtual |
Calculate the optimal influence function of [23].
(optimised for force calculations)
Each node calculates only the values for its domain in k-space.
See also: [23] eq. 8-22 (p. 275). Note the somewhat different convention for the prefactors, which is described in [11] [12].
Implements CoulombP3M.
Definition at line 165 of file p3m_heffte.impl.hpp.
References System::System::box_geo, grid_influence_function(), P3M_BRILLOUIN, and stream.
|
overridevirtual |
Implements CoulombP3M.
Definition at line 424 of file p3m_heffte.impl.hpp.
References ParticlePropertyRange::charge_range(), ParticlePropertyRange::pos_range(), and stream.
|
overridevirtual |
Implements CoulombP3M.
Definition at line 125 of file p3m_heffte.impl.hpp.
References comm_cart, reduce_over_local_particles(), Utils::sqr(), and stream.
|
inlineoverridevirtual |
Implements CoulombP3M.
Definition at line 161 of file p3m_heffte.hpp.
References CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::p3m, CoulombP3MState< FloatType, FFTConfig >::square_sum_q, CoulombP3MState< FloatType, FFTConfig >::sum_q2, and CoulombP3MState< FloatType, FFTConfig >::sum_qpart.
|
inlineoverridevirtual |
Implements CoulombP3M.
Definition at line 149 of file p3m_heffte.hpp.
References CPU, CUDA, CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::init_cpu_kernels(), CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::init_gpu_kernels(), and stream.
|
protected |
Definition at line 299 of file p3m_heffte.impl.hpp.
References Utils::Vector< T, N >::broadcast(), comm_cart, communicator, Communicator::node_grid, p3m_max_cao, p3m_min_cao, Utils::product(), and stream.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::init(), and CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::on_activation().
|
protected |
Definition at line 1200 of file p3m_heffte.impl.hpp.
References P3MParameters::alpha, P3MParameters::cao, CUDA, P3MParameters::mesh, p3m_gpu_init(), P3MStateCommon< FloatType >::params, and stream.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::init().
|
inlineoverridevirtualnoexcept |
Implements CoulombP3M.
Definition at line 175 of file p3m_heffte.hpp.
|
inlineoverridevirtualnoexcept |
|
inlineoverridevirtualnoexcept |
Implements CoulombP3M.
Definition at line 171 of file p3m_heffte.hpp.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::on_activation().
|
inlineoverridevirtual |
Implements CoulombP3M.
Definition at line 196 of file p3m_heffte.hpp.
References CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::long_range_kernel().
|
protected |
Compute the k-space part of forces and energies.
Definition at line 691 of file p3m_heffte.impl.hpp.
References Utils::Vector< T, N >::broadcast(), calc_dipole_moment(), charge_assign(), ParticlePropertyRange::charge_range(), comm_cart, ParticlePropertyRange::force_range(), kokkos_parallel_range_for(), System::System::npt_add_virial_contribution(), P3M_EPSILON_METALLIC, Utils::sqr(), stream, this_node, and ParticlePropertyRange::unfolded_pos_range().
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::add_long_range_forces(), and CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::long_range_energy().
|
overridevirtual |
Calculate the long range electrostatics part of the pressure tensor. This is part \(\Pi_{\textrm{dir}, \alpha, \beta}\) eq. (2.6) in [18]. The part \(\Pi_{\textrm{corr}, \alpha, \beta}\) eq. (2.8) is not present here since M is the empty set in our simulations.
Implements CoulombP3M.
Definition at line 621 of file p3m_heffte.impl.hpp.
References System::System::box_geo, Utils::Vector< T, N >::broadcast(), charge_assign(), Utils::sqr(), and stream.
|
inlineoverridevirtual |
Implements CoulombP3M.
Definition at line 179 of file p3m_heffte.hpp.
References CUDA, CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::init_cpu_kernels(), CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::is_tuned(), CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::request_gpu(), CoulombP3M::sanity_checks(), stream, and CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::tune().
|
inlineoverridevirtual |
Implements CoulombP3M.
Definition at line 216 of file p3m_heffte.hpp.
References P3MParameters::cao, CoulombP3MState< FloatType, FFTConfig >::inter_weights, P3MStateCommon< FloatType >::local_mesh, CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::p3m, P3MStateCommon< FloatType >::params, p3m_interpolation_cache::reset(), CoulombP3MState< FloatType, FFTConfig >::rs_charge_density, CoulombP3MState< FloatType, FFTConfig >::rs_charge_density_kokkos, P3MLocalMesh::size, and stream.
|
protected |
Definition at line 1213 of file p3m_heffte.impl.hpp.
References CUDA, GpuParticleData::enable_property(), GpuParticleData::prop::force, System::System::gpu, GpuParticleData::prop::pos, GpuParticleData::prop::q, and stream.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::on_activation().
|
overrideprotectedvirtual |
Implements CoulombP3M.
Definition at line 1162 of file p3m_heffte.impl.hpp.
References P3MParameters::alpha, P3MParameters::alpha_L, System::System::box_geo, comm_cart, CoulombP3MState< FloatType, FFTConfig >::halo_comm, P3MStateCommon< FloatType >::local_mesh, P3MStateCommon< FloatType >::params, P3MParameters::r_cut, P3MParameters::r_cut_iL, P3MParameters::recalc_a_ai_cao_cut(), and P3MLocalMesh::recalc_ld_pos().
|
overridevirtual |
Implements CoulombP3M.
Definition at line 1072 of file p3m_heffte.impl.hpp.
References P3MParameters::alpha, P3MParameters::alpha_L, P3MStateCommon< FloatType >::params, P3MParameters::r_cut, P3MParameters::r_cut_iL, stream, CoulombP3MState< FloatType, FFTConfig >::sum_qpart, and P3MParameters::tuning.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::on_activation().
|
protected |
Definition at line 242 of file p3m_heffte.hpp.
| CoulombP3MStateClass& CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::p3m |
Coulomb P3M parameters.
Definition at line 110 of file p3m_heffte.hpp.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::adapt_epsilon_elc(), CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::CoulombP3MHeffte(), CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::count_charged_particles_elc(), and CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::prepare_fft_mesh().