ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include "config/config.hpp"
#include "p3m/common.hpp"
#include "p3m/for_each_3d.hpp"
#include "p3m/math.hpp"
#include <utils/Vector.hpp>
#include <utils/math/int_pow.hpp>
#include <utils/math/sqr.hpp>
#include <cmath>
#include <cstddef>
#include <functional>
#include <numbers>
#include <vector>
Go to the source code of this file.
Functions | |
template<std::size_t S> | |
double | G_opt_dipolar (P3MParameters const ¶ms, Utils::Vector3i const &shift, Utils::Vector3i const &d_op) |
Calculate the aliasing sums for the optimal influence function. | |
template<typename FloatType , std::size_t S> | |
std::vector< FloatType > | grid_influence_function (P3MParameters const ¶ms, Utils::Vector3i const &n_start, Utils::Vector3i const &n_stop, Utils::Vector3d const &inv_box_l) |
Map influence function over a grid. | |
double | G_opt_dipolar_self_energy (P3MParameters const ¶ms, Utils::Vector3i const &shift) |
template<typename FloatType > | |
double | grid_influence_function_self_energy (P3MParameters const ¶ms, Utils::Vector3i const &n_start, Utils::Vector3i const &n_stop, std::vector< FloatType > const &g) |
Calculate self-energy of the influence function. | |
double G_opt_dipolar | ( | P3MParameters const & | params, |
Utils::Vector3i const & | shift, | ||
Utils::Vector3i const & | d_op | ||
) |
Calculate the aliasing sums for the optimal influence function.
Calculates the aliasing sums in the numerator and denominator of the expression for the optimal influence function (see [22] : 8-22, p. 275).
S | order (2 for energy, 3 for forces) |
params | DP3M parameters |
shift | shift for a given n-vector |
d_op | differential operator for a given n-vector |
Definition at line 55 of file influence_function_dipolar.hpp.
References Utils::Vector< T, N >::broadcast(), for_each_3d(), Utils::Vector< T, N >::norm2(), P3M_BRILLOUIN, params, Utils::product(), math::sinc(), and Utils::sqr().
|
inline |
Definition at line 153 of file influence_function_dipolar.hpp.
References Utils::Vector< T, N >::broadcast(), for_each_3d(), P3M_BRILLOUIN, params, Utils::product(), and math::sinc().
Referenced by grid_influence_function_self_energy().
std::vector< FloatType > grid_influence_function | ( | P3MParameters const & | params, |
Utils::Vector3i const & | n_start, | ||
Utils::Vector3i const & | n_stop, | ||
Utils::Vector3d const & | inv_box_l | ||
) |
Map influence function over a grid.
This evaluates the optimal influence function G_opt_dipolar over a regular grid of k vectors, and returns the values as a vector.
S | Order of the differential operator, e.g. 2 for energy, 3 for force |
params | DP3M parameters |
n_start | Lower left corner of the grid |
n_stop | Upper right corner of the grid. |
inv_box_l | Inverse box length |
Definition at line 109 of file influence_function_dipolar.hpp.
References for_each_3d(), params, and Utils::product().
|
inline |
Calculate self-energy of the influence function.
params | DP3M parameters |
n_start | Lower left corner of the grid |
n_stop | Upper right corner of the grid. |
g | Energies on the grid. |
Definition at line 187 of file influence_function_dipolar.hpp.
References for_each_3d(), G_opt_dipolar_self_energy(), and params.
Referenced by DipolarP3MImpl< FloatType, Architecture >::calc_average_self_energy_k_space().