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

Structure to hold P3M parameters and some dependent variables. More...

#include <common.hpp>

Public Member Functions

 P3MParameters (bool tuning, double epsilon, double r_cut, Utils::Vector3i const &mesh, Utils::Vector3d const &mesh_off, int cao, double alpha, double accuracy)
 
void recalc_a_ai_cao_cut (Utils::Vector3d const &box_l)
 Recalculate quantities derived from the mesh and box length: a, ai and cao_cut.
 
auto calc_grid_pos (Utils::Vector3d const &pos) const
 Convert spatial position to grid position.
 

Public Attributes

bool tuning
 tuning or production?
 
double alpha_L
 Ewald splitting parameter (0.
 
double r_cut_iL
 cutoff radius for real space electrostatics (>0), rescaled to r_cut_iL = r_cut * box_l_i.
 
Utils::Vector3i mesh = {}
 number of mesh points per coordinate direction (>0).
 
Utils::Vector3d mesh_off
 offset of the first mesh point (lower left corner) from the coordinate origin ([0,1[).
 
int cao
 charge assignment order ([0,7]).
 
double accuracy
 accuracy of the actual parameter set.
 
double epsilon
 epsilon of the "surrounding dielectric".
 
Utils::Vector3d cao_cut
 cutoff for charge assignment.
 
Utils::Vector3d a
 mesh constant.
 
Utils::Vector3d ai
 inverse mesh constant.
 
double alpha
 unscaled alpha_L for use with fast inline functions only
 
double r_cut
 unscaled r_cut_iL for use with fast inline functions only
 
int cao3
 number of points unto which a single charge is interpolated, i.e.
 

Detailed Description

Structure to hold P3M parameters and some dependent variables.

Definition at line 59 of file p3m/common.hpp.

Constructor & Destructor Documentation

◆ P3MParameters()

P3MParameters::P3MParameters ( bool  tuning,
double  epsilon,
double  r_cut,
Utils::Vector3i const &  mesh,
Utils::Vector3d const &  mesh_off,
int  cao,
double  alpha,
double  accuracy 
)
inline

Member Function Documentation

◆ calc_grid_pos()

auto P3MParameters::calc_grid_pos ( Utils::Vector3d const &  pos) const
inline

Convert spatial position to grid position.

To get the grid index, round the result to the nearest integer.

Definition at line 169 of file p3m/common.hpp.

References ai, Utils::hadamard_product(), and mesh_off.

◆ recalc_a_ai_cao_cut()

void P3MParameters::recalc_a_ai_cao_cut ( Utils::Vector3d const &  box_l)
inline

Recalculate quantities derived from the mesh and box length: a, ai and cao_cut.

Definition at line 159 of file p3m/common.hpp.

References a, ai, Utils::Vector< T, N >::broadcast(), cao, cao_cut, Utils::hadamard_division(), and mesh.

Referenced by DipolarP3MImpl< FloatType, Architecture >::scaleby_box_l().

Member Data Documentation

◆ a

Utils::Vector3d P3MParameters::a

mesh constant.

Definition at line 83 of file p3m/common.hpp.

Referenced by recalc_a_ai_cao_cut().

◆ accuracy

◆ ai

Utils::Vector3d P3MParameters::ai

inverse mesh constant.

Definition at line 85 of file p3m/common.hpp.

Referenced by calc_grid_pos(), and recalc_a_ai_cao_cut().

◆ alpha

◆ alpha_L

◆ cao

int P3MParameters::cao

charge assignment order ([0,7]).

Definition at line 74 of file p3m/common.hpp.

Referenced by TuningAlgorithm::determine_cao_limits(), P3MParameters(), and recalc_a_ai_cao_cut().

◆ cao3

int P3MParameters::cao3

number of points unto which a single charge is interpolated, i.e.

cao cubed

Definition at line 94 of file p3m/common.hpp.

◆ cao_cut

Utils::Vector3d P3MParameters::cao_cut

cutoff for charge assignment.

Definition at line 81 of file p3m/common.hpp.

Referenced by recalc_a_ai_cao_cut(), CoulombP3M::sanity_checks_boxl(), and DipolarP3M::sanity_checks_boxl().

◆ epsilon

double P3MParameters::epsilon

epsilon of the "surrounding dielectric".

Definition at line 79 of file p3m/common.hpp.

Referenced by P3MParameters(), and CoulombP3M::sanity_checks_boxl().

◆ mesh

◆ mesh_off

Utils::Vector3d P3MParameters::mesh_off

offset of the first mesh point (lower left corner) from the coordinate origin ([0,1[).

Definition at line 72 of file p3m/common.hpp.

Referenced by calc_grid_pos(), and P3MParameters().

◆ r_cut

◆ r_cut_iL

double P3MParameters::r_cut_iL

cutoff radius for real space electrostatics (>0), rescaled to r_cut_iL = r_cut * box_l_i.

Definition at line 67 of file p3m/common.hpp.

Referenced by TuningAlgorithm::determine_r_cut_limits(), DipolarP3MImpl< FloatType, Architecture >::scaleby_box_l(), and DipolarP3MImpl< FloatType, Architecture >::tune().

◆ tuning

bool P3MParameters::tuning

tuning or production?

Definition at line 61 of file p3m/common.hpp.

Referenced by P3MParameters(), TuningAlgorithm::tune(), and DipolarP3MImpl< FloatType, Architecture >::tune().


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