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

Abstraction of a Coulomb method from the ScaFaCoS library. More...

#include <Coulomb.hpp>

+ Inheritance diagram for Scafacos::Coulomb:
+ Collaboration diagram for Scafacos::Coulomb:

Public Member Functions

 Coulomb (MPI_Comm comm, std::string method, std::string parameters)
 
void set_runtime_parameters (double const *box_l, int const *periodicity, int total_particles)
 Set box geometry and number of particles.
 
void run (std::vector< double > &charges, std::vector< double > &positions, std::vector< double > &fields, std::vector< double > &potentials)
 Calculate the fields and potentials for charges.
 
void set_near_field_delegation (bool delegate)
 Delegate the short-range calculation.
 
bool get_near_field_delegation () const
 
double pair_force (double dist) const
 Calculate short-range pair force.
 
double pair_energy (double dist) const
 Calculate short-range pair energy.
 
void tune (std::vector< double > &charges, std::vector< double > &positions)
 Tune parameters.
 
double r_cut () const
 Get short-range cutoff (0.0 if not supported by the method).
 
void set_r_cut (double r_cut)
 Set short-range cutoff.
 
- Public Member Functions inherited from Scafacos::Scafacos
 Scafacos (MPI_Comm comm, std::string method, std::string parameters)
 
 ~Scafacos ()
 
std::string get_parameters () const
 Get the parameters from the library.
 
std::string get_method () const
 Get active method name.
 
void set_runtime_parameters (double const *box_l, int const *periodicity, int total_particles, int near_field_flag)
 Set box geometry, number of particles and calculation type.
 

Additional Inherited Members

- Static Public Member Functions inherited from Scafacos::Scafacos
static std::vector< std::string > available_methods ()
 Get a list of methods supported by the library.
 
- Protected Attributes inherited from Scafacos::Scafacos
FCS m_handle
 Handle from the library.
 

Detailed Description

Abstraction of a Coulomb method from the ScaFaCoS library.

Definition at line 35 of file Coulomb.hpp.

Constructor & Destructor Documentation

◆ Coulomb()

Scafacos::Coulomb::Coulomb ( MPI_Comm  comm,
std::string  method,
std::string  parameters 
)

Definition at line 33 of file Coulomb.cpp.

References Scafacos::Scafacos::m_handle.

Member Function Documentation

◆ get_near_field_delegation()

bool Scafacos::Coulomb::get_near_field_delegation ( ) const
inline

Definition at line 56 of file Coulomb.hpp.

◆ pair_energy()

double Scafacos::Coulomb::pair_energy ( double  dist) const
inline

Calculate short-range pair energy.

Definition at line 70 of file Coulomb.hpp.

References Scafacos::Scafacos::m_handle.

◆ pair_force()

double Scafacos::Coulomb::pair_force ( double  dist) const
inline

Calculate short-range pair force.

Definition at line 59 of file Coulomb.hpp.

References Scafacos::Scafacos::m_handle.

◆ r_cut()

double Scafacos::Coulomb::r_cut ( ) const

Get short-range cutoff (0.0 if not supported by the method).

Definition at line 61 of file Coulomb.cpp.

References Scafacos::Scafacos::m_handle, and r_cut().

Referenced by r_cut(), and set_r_cut().

◆ run()

void Scafacos::Coulomb::run ( std::vector< double > &  charges,
std::vector< double > &  positions,
std::vector< double > &  fields,
std::vector< double > &  potentials 
)

Calculate the fields and potentials for charges.

Definition at line 76 of file Coulomb.cpp.

References handle_error, Scafacos::Scafacos::m_handle, and tune().

◆ set_near_field_delegation()

void Scafacos::Coulomb::set_near_field_delegation ( bool  delegate)

Delegate the short-range calculation.

By default, ESPResSo calculates the short-range forces and energies if the chosen ScaFaCoS method support delegation. This decision can be overriden to obtain the result from a full ScaFaCos calculation.

Parameters
delegateDelegate short-range calculation to ESPResSo if true, or to ScaFaCoS if false.

Definition at line 49 of file Coulomb.cpp.

References Scafacos::Scafacos::get_method(), handle_error, and Scafacos::Scafacos::m_handle.

◆ set_r_cut()

void Scafacos::Coulomb::set_r_cut ( double  r_cut)

Set short-range cutoff.

Definition at line 70 of file Coulomb.cpp.

References Scafacos::Scafacos::m_handle, and r_cut().

◆ set_runtime_parameters()

void Scafacos::Coulomb::set_runtime_parameters ( double const *  box_l,
int const *  periodicity,
int  total_particles 
)

Set box geometry and number of particles.

Definition at line 41 of file Coulomb.cpp.

References Scafacos::Scafacos::set_runtime_parameters().

◆ tune()

void Scafacos::Coulomb::tune ( std::vector< double > &  charges,
std::vector< double > &  positions 
)

Tune parameters.

Definition at line 90 of file Coulomb.cpp.

References handle_error, and Scafacos::Scafacos::m_handle.

Referenced by run().


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