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), in real space.
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 67 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 177 of file p3m/common.hpp.

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

Referenced by P3MLocalMesh::calc_local_ca_mesh().

◆ 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 167 of file p3m/common.hpp.

References a, ai, cao, cao_cut, Utils::hadamard_division(), and mesh.

Member Data Documentation

◆ a

Utils::Vector3d P3MParameters::a

mesh constant.

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

Referenced by G_opt(), P3MParameters(), recalc_a_ai_cao_cut(), and P3MLocalMesh::recalc_ld_pos().

◆ accuracy

double P3MParameters::accuracy

accuracy of the actual parameter set.

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

Referenced by TuningAlgorithm::get_mc_time(), P3MParameters(), and TuningAlgorithm::tune().

◆ ai

Utils::Vector3d P3MParameters::ai

inverse mesh constant.

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

Referenced by calc_grid_pos(), P3MParameters(), and recalc_a_ai_cao_cut().

◆ alpha

double P3MParameters::alpha

unscaled alpha_L for use with fast inline functions only

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

Referenced by G_opt(), and P3MParameters().

◆ alpha_L

double P3MParameters::alpha_L

Ewald splitting parameter (0.

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

Referenced by G_opt_dipolar(), and P3MParameters().

◆ cao

int P3MParameters::cao

◆ cao3

int P3MParameters::cao3

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

cao cubed

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

Referenced by P3MParameters().

◆ cao_cut

Utils::Vector3d P3MParameters::cao_cut

cutoff for charge assignment.

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

Referenced by P3MLocalMesh::calc_local_ca_mesh(), P3MParameters(), and recalc_a_ai_cao_cut().

◆ epsilon

double P3MParameters::epsilon

epsilon of the "surrounding dielectric".

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

Referenced by P3MParameters().

◆ 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 80 of file p3m/common.hpp.

Referenced by calc_grid_pos(), FFTBackendLegacy< FloatType >::init(), P3MParameters(), and P3MLocalMesh::recalc_ld_pos().

◆ r_cut

double P3MParameters::r_cut

unscaled r_cut_iL for use with fast inline functions only

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

Referenced by P3MParameters().

◆ 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 75 of file p3m/common.hpp.

Referenced by TuningAlgorithm::determine_r_cut_limits(), and P3MParameters().

◆ tuning

bool P3MParameters::tuning

tuning or production?

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

Referenced by grid_influence_function(), grid_influence_function_dipolar(), P3MParameters(), and TuningAlgorithm::tune().


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