ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
CoulombMMM1D Struct Reference

Parameters for the MMM1D electrostatic interaction. More...

#include <mmm1d.hpp>

+ Inheritance diagram for CoulombMMM1D:
+ Collaboration diagram for CoulombMMM1D:

Public Member Functions

 CoulombMMM1D (double prefactor, double maxPWerror, double switch_rad, int tune_timings, bool tune_verbose)
 
Utils::Vector3d pair_force (double q1q2, Utils::Vector3d const &d, double dist) const
 Compute the pair force.
 
double pair_energy (double q1q2, Utils::Vector3d const &d, double dist) const
 Compute the pair energy.
 
void tune ()
 
bool is_tuned () const
 
void on_activation ()
 
void on_boxl_change ()
 Recalculate all box-length-dependent parameters.
 
void on_node_grid_change () const
 
void on_periodicity_change () const
 
void on_cell_structure_change ()
 
void init ()
 Recalculate all derived parameters.
 
void sanity_checks () const
 
- Public Member Functions inherited from Coulomb::Actor< CoulombMMM1D >
void set_prefactor (double new_prefactor)
 
void sanity_checks_charge_neutrality () const
 
- Public Member Functions inherited from System::Leaf< Class >
void bind_system (std::shared_ptr< System > const &system)
 
void detach_system (std::shared_ptr< System > const &system)
 

Public Attributes

double maxPWerror
 Maximal allowed pairwise error for the potential and force.
 
double far_switch_radius
 Far switch radius.
 
int tune_timings
 
bool tune_verbose
 
- Public Attributes inherited from Coulomb::Actor< CoulombMMM1D >
double prefactor
 Electrostatics prefactor.
 
double charge_neutrality_tolerance
 Relative tolerance for the charge excess during neutrality checks.
 

Additional Inherited Members

- Static Public Attributes inherited from Coulomb::Actor< CoulombMMM1D >
static auto constexpr charge_neutrality_tolerance_default
 
- Protected Member Functions inherited from System::Leaf< Class >
auto & get_system ()
 
auto & get_system () const
 
- Protected Attributes inherited from System::Leaf< Class >
std::weak_ptr< Systemm_system
 

Detailed Description

Parameters for the MMM1D electrostatic interaction.

Definition at line 51 of file mmm1d.hpp.

Constructor & Destructor Documentation

◆ CoulombMMM1D()

CoulombMMM1D::CoulombMMM1D ( double  prefactor,
double  maxPWerror,
double  switch_rad,
int  tune_timings,
bool  tune_verbose 
)

Member Function Documentation

◆ init()

void CoulombMMM1D::init ( )
inline

Recalculate all derived parameters.

Definition at line 96 of file mmm1d.hpp.

◆ is_tuned()

bool CoulombMMM1D::is_tuned ( ) const
inline

Definition at line 84 of file mmm1d.hpp.

Referenced by tune().

◆ on_activation()

void CoulombMMM1D::on_activation ( )
inline

Definition at line 86 of file mmm1d.hpp.

References sanity_checks(), and tune().

◆ on_boxl_change()

void CoulombMMM1D::on_boxl_change ( )
inline

Recalculate all box-length-dependent parameters.

Definition at line 91 of file mmm1d.hpp.

◆ on_cell_structure_change()

void CoulombMMM1D::on_cell_structure_change ( )
inline

Definition at line 94 of file mmm1d.hpp.

◆ on_node_grid_change()

void CoulombMMM1D::on_node_grid_change ( ) const
inline

Definition at line 92 of file mmm1d.hpp.

◆ on_periodicity_change()

void CoulombMMM1D::on_periodicity_change ( ) const
inline

Definition at line 93 of file mmm1d.hpp.

◆ pair_energy()

double CoulombMMM1D::pair_energy ( double  q1q2,
Utils::Vector3d const &  d,
double  dist 
) const

Compute the pair energy.

Parameters
[in]q1q2Product of the charges on p1 and p2.
[in]dVector pointing from p1 to p2.
[in]distDistance between p1 and p2.

Definition at line 273 of file mmm1d.cpp.

References System::Leaf< Class >::get_system(), K0(), maxPWerror, mod_psi_even(), and Coulomb::Actor< CoulombMMM1D >::prefactor.

◆ pair_force()

Utils::Vector3d CoulombMMM1D::pair_force ( double  q1q2,
Utils::Vector3d const &  d,
double  dist 
) const

Compute the pair force.

Parameters
[in]q1q2Product of the charges on p1 and p2.
[in]dVector pointing from p1 to p2.
[in]distDistance between p1 and p2.

Definition at line 182 of file mmm1d.cpp.

References System::Leaf< Class >::get_system(), K0(), K1(), LPK01(), maxPWerror, mod_psi_even(), mod_psi_odd(), and Coulomb::Actor< CoulombMMM1D >::prefactor.

◆ sanity_checks()

void CoulombMMM1D::sanity_checks ( ) const
inline

◆ tune()

void CoulombMMM1D::tune ( )

Member Data Documentation

◆ far_switch_radius

double CoulombMMM1D::far_switch_radius

Far switch radius.

Represents the xy-distance at which the calculation switches from the far to the near formula.

Definition at line 61 of file mmm1d.hpp.

Referenced by CoulombMMM1D().

◆ maxPWerror

double CoulombMMM1D::maxPWerror

Maximal allowed pairwise error for the potential and force.

This error ignores prefactors, i.e. this is for a pure lattice 1/r-sum.

Definition at line 56 of file mmm1d.hpp.

Referenced by CoulombMMM1D(), pair_energy(), and pair_force().

◆ tune_timings

int CoulombMMM1D::tune_timings

Definition at line 62 of file mmm1d.hpp.

Referenced by CoulombMMM1D(), and tune().

◆ tune_verbose

bool CoulombMMM1D::tune_verbose

Definition at line 63 of file mmm1d.hpp.

Referenced by tune().


The documentation for this struct was generated from the following files: