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

#include <elc.hpp>

+ Inheritance diagram for ElectrostaticLayerCorrection:
+ Collaboration diagram for ElectrostaticLayerCorrection:

Public Types

using BaseSolver = std::variant< std::shared_ptr< CoulombP3M > >
 

Public Member Functions

 ElectrostaticLayerCorrection (elc_data &&parameters, BaseSolver &&solver)
 
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
 
std::optional< std::string > veto_r_cut (double r_cut) const
 Veto real-space cutoff values that are incompatible with ELC.
 
double pair_energy_correction (Particle const &p1, Particle const &p2, double q1q2) const
 Calculate short-range pair energy correction.
 
void add_pair_force_corrections (Particle &p1, Particle &p2, double q1q2) const
 Add short-range pair force corrections.
 
double long_range_energy (ParticleRange const &particles) const
 
void add_long_range_forces (ParticleRange const &particles) const
 
- Public Member Functions inherited from Coulomb::Actor< ElectrostaticLayerCorrection >
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

elc_data elc
 
BoxGeometrym_box_geo
 
BaseSolver base_solver
 Electrostatics solver that is adapted.
 
- Public Attributes inherited from Coulomb::Actor< ElectrostaticLayerCorrection >
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< ElectrostaticLayerCorrection >
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

Definition at line 167 of file elc.hpp.

Member Typedef Documentation

◆ BaseSolver

using ElectrostaticLayerCorrection::BaseSolver = std::variant<std::shared_ptr<CoulombP3M> >

Definition at line 169 of file elc.hpp.

Constructor & Destructor Documentation

◆ ElectrostaticLayerCorrection()

ElectrostaticLayerCorrection::ElectrostaticLayerCorrection ( elc_data &&  parameters,
BaseSolver &&  solver 
)

Definition at line 1104 of file elc.cpp.

Member Function Documentation

◆ add_long_range_forces()

void ElectrostaticLayerCorrection::add_long_range_forces ( ParticleRange const &  particles) const

◆ add_pair_force_corrections()

void ElectrostaticLayerCorrection::add_pair_force_corrections ( Particle p1,
Particle p2,
double  q1q2 
) const
inline

◆ init()

void ElectrostaticLayerCorrection::init ( )
inline

Recalculate all derived parameters.

Definition at line 225 of file elc.hpp.

◆ long_range_energy()

double ElectrostaticLayerCorrection::long_range_energy ( ParticleRange const &  particles) const

◆ on_activation()

void ElectrostaticLayerCorrection::on_activation ( )
inline

◆ on_boxl_change()

void ElectrostaticLayerCorrection::on_boxl_change ( )
inline

Recalculate all box-length-dependent parameters.

Definition at line 201 of file elc.hpp.

◆ on_cell_structure_change()

void ElectrostaticLayerCorrection::on_cell_structure_change ( )
inline

Definition at line 214 of file elc.hpp.

References elc_data::dielectric_contrast_on, and elc.

◆ on_node_grid_change()

void ElectrostaticLayerCorrection::on_node_grid_change ( ) const
inline

Definition at line 207 of file elc.hpp.

◆ on_periodicity_change()

void ElectrostaticLayerCorrection::on_periodicity_change ( ) const
inline

Definition at line 210 of file elc.hpp.

◆ pair_energy_correction()

double ElectrostaticLayerCorrection::pair_energy_correction ( Particle const &  p1,
Particle const &  p2,
double  q1q2 
) const
inline

Calculate short-range pair energy correction.

Definition at line 253 of file elc.hpp.

References base_solver, elc_data::dielectric_contrast_on, elc_data::dielectric_layers_contribution(), elc, m_box_geo, Utils::Vector< T, N >::norm(), and Particle::pos().

◆ sanity_checks()

void ElectrostaticLayerCorrection::sanity_checks ( ) const
inline

◆ veto_r_cut()

std::optional< std::string > ElectrostaticLayerCorrection::veto_r_cut ( double  r_cut) const
inline

Veto real-space cutoff values that are incompatible with ELC.

When ELC is used with dielectric contrasts, the short-range cutoff needs to be smaller than the gap size to allow placement of the image charges.

Definition at line 245 of file elc.hpp.

References elc_data::dielectric_contrast_on, elc, and elc_data::gap_size.

Member Data Documentation

◆ base_solver

BaseSolver ElectrostaticLayerCorrection::base_solver

Electrostatics solver that is adapted.

Definition at line 175 of file elc.hpp.

Referenced by add_long_range_forces(), add_pair_force_corrections(), long_range_energy(), and pair_energy_correction().

◆ elc

◆ m_box_geo

BoxGeometry* ElectrostaticLayerCorrection::m_box_geo

Definition at line 172 of file elc.hpp.

Referenced by add_pair_force_corrections(), and pair_energy_correction().


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