ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
math.hpp File Reference
#include <utils/device_qualifier.hpp>
#include <utils/math/sqr.hpp>
#include <cmath>
#include <numbers>
#include <stdexcept>
#include <string>
+ Include dependency graph for math.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  math
 

Macros

#define P3M_BRILLOUIN   0
 P3M: Number of Brillouin zones taken into account in the calculation of the optimal influence function (aliasing sums).
 
#define USE_ERFC_APPROXIMATION   1
 Whether to use the Abramowitz/Stegun approximation [1] Utils::AS_erfc_part() for \(\exp(d^2) \mathrm{erfc}(d)\), or the C function std::erfc() in P3M.
 

Functions

DEVICE_QUALIFIER auto math::abs (double x)
 Return the absolute value of x.
 
DEVICE_QUALIFIER auto math::abs (float x)
 Return the absolute value of x.
 
template<typename T >
DEVICE_QUALIFIER auto math::sinc (T x)
 Calculate the function \( \mathrm{sinc}(x) = \sin(\pi x)/(\pi x) \).
 
template<int cao>
DEVICE_QUALIFIER auto math::analytic_cotangent_sum (int n, double mesh_i)
 One of the aliasing sums used to compute k-space errors.
 
auto math::get_analytic_cotangent_sum_kernel (int cao)
 

Variables

constexpr int p3m_min_cao = 1
 Minimal charge assignment order.
 
constexpr int p3m_max_cao = 7
 Maximal charge assignment order.
 

Macro Definition Documentation

◆ P3M_BRILLOUIN

#define P3M_BRILLOUIN   0

P3M: Number of Brillouin zones taken into account in the calculation of the optimal influence function (aliasing sums).

Definition at line 38 of file math.hpp.

◆ USE_ERFC_APPROXIMATION

#define USE_ERFC_APPROXIMATION   1

Whether to use the Abramowitz/Stegun approximation [1] Utils::AS_erfc_part() for \(\exp(d^2) \mathrm{erfc}(d)\), or the C function std::erfc() in P3M.

Definition at line 45 of file math.hpp.

Variable Documentation

◆ p3m_max_cao

◆ p3m_min_cao