51 auto const &actor = *ptr;
54 return actor.pair_force(q1q2, d, dist);
60 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
61 return std::visit(*
this, ptr->base_solver);
79 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
80 auto const &actor = *ptr;
82 actor.add_pair_force_corrections(p1, p2, q1q2);
95 std::enable_if_t<traits::has_pressure<T>::value> * =
nullptr>
97 auto const &actor = *ptr;
104 template <
typename T,
105 std::enable_if_t<!traits::has_pressure<T>::value> * =
nullptr>
118 template <
typename T>
120 auto const &actor = *ptr;
123 return actor.pair_energy(q1q2, dist);
128 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
129 auto const &actor = *ptr;
130 auto const energy_kernel = std::visit(*
this, actor.base_solver);
136 energy = (*energy_kernel)(p1, p2, q1q2, d, dist);
138 return energy + actor.pair_energy_correction(p1, p2, q1q2);
145 return actor->pair_energy(q1q2, d, dist);
151inline std::optional<Solver::ShortRangeForceKernel>
154 if (
auto &solver =
impl->solver; solver.has_value()) {
156 return std::visit(visitor, *solver);
162inline std::optional<Solver::ShortRangeForceCorrectionsKernel>
165 if (
auto &solver =
impl->solver; solver.has_value()) {
167 return std::visit(visitor, *solver);
173inline std::optional<Solver::ShortRangePressureKernel>
176 if (
auto &solver =
impl->solver; solver.has_value()) {
178 return std::visit(visitor, *solver);
184inline std::optional<Solver::ShortRangeEnergyKernel>
187 if (
auto &solver =
impl->solver; solver.has_value()) {
189 return std::visit(visitor, *solver);
Vector implementation and trait types for boost qvm interoperability.
This file contains the defaults for ESPResSo.
Matrix implementation and trait types for boost qvm interoperability.
Matrix< T, N, M > tensor_product(const Vector< T, N > &x, const Vector< T, M > &y)
result_type operator()(std::shared_ptr< T > const &ptr) const
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< ElectrostaticLayerCorrection > const &ptr) const
result_type operator()(std::shared_ptr< CoulombMMM1D > const &actor) const
Solver::ShortRangeEnergyKernel kernel_type
result_type operator()(std::shared_ptr< T > const &) const
Solver::ShortRangeForceCorrectionsKernel kernel_type
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< ElectrostaticLayerCorrection > const &ptr) const
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< T > const &ptr) const
auto operator()(std::shared_ptr< ElectrostaticLayerCorrection > const &ptr) const
Solver::ShortRangeForceKernel kernel_type
result_type operator()(std::shared_ptr< T > const &) const
std::optional< kernel_type > result_type
Solver::ShortRangePressureKernel kernel_type
result_type operator()(std::shared_ptr< T > const &ptr) const
std::optional< ShortRangePressureKernel > pair_pressure_kernel() const
std::function< Utils::Matrix< double, 3, 3 >(double, Utils::Vector3d const &, double)> ShortRangePressureKernel
std::function< Utils::Vector3d(double, Utils::Vector3d const &, double)> ShortRangeForceKernel
std::function< double(Particle const &, Particle const &, double, Utils::Vector3d const &, double)> ShortRangeEnergyKernel
std::optional< ShortRangeForceKernel > pair_force_kernel() const
std::function< void(Particle &, Particle &, double)> ShortRangeForceCorrectionsKernel
std::unique_ptr< Implementation > impl
Pointer-to-implementation.
std::optional< ShortRangeEnergyKernel > pair_energy_kernel() const
std::optional< ShortRangeForceCorrectionsKernel > pair_force_elc_kernel() const
Struct holding all information for one particle.