47#ifdef ESPRESSO_ELECTROSTATICS
50 auto const &actor = *ptr;
53 return actor.pair_force(q1q2, d,
dist);
59 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
60 return std::visit(*
this, ptr->base_solver);
78 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
79 auto const &actor = *ptr;
95#ifdef ESPRESSO_ELECTROSTATICS
114#ifdef ESPRESSO_ELECTROSTATICS
115 template <
typename T>
117 auto const &actor = *ptr;
121 double dist) {
return actor.pair_energy(q1q2,
dist); }};
125 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
126 auto const &actor = *ptr;
127 auto const energy_kernel = std::visit(*
this, actor.base_solver);
134 energy = (*energy_kernel)(pos1, pos2, q1q2, d,
dist);
136 return energy + actor.pair_energy_correction(pos1, pos2, q1q2);
145 double dist) {
return actor->pair_energy(q1q2, d,
dist); }};
151inline std::optional<Solver::ShortRangeForceKernel>
153#ifdef ESPRESSO_ELECTROSTATICS
154 if (
auto &solver =
impl->solver; solver.has_value()) {
156 return std::visit(
visitor, *solver);
162inline std::optional<Solver::ShortRangeForceCorrectionsKernel>
164#ifdef ESPRESSO_ELECTROSTATICS
165 if (
auto &solver =
impl->solver; solver.has_value()) {
167 return std::visit(
visitor, *solver);
173inline std::optional<Solver::ShortRangePressureKernel>
175#ifdef ESPRESSO_ELECTROSTATICS
176 if (
auto &solver =
impl->solver; solver.has_value()) {
178 return std::visit(
visitor, *solver);
184inline std::optional<Solver::ShortRangeEnergyKernel>
186#ifdef ESPRESSO_ELECTROSTATICS
187 if (
auto &solver =
impl->solver; solver.has_value()) {
189 return std::visit(
visitor, *solver);
Vector implementation and trait types for boost qvm interoperability.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
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 &ptr) const
std::optional< kernel_type > result_type
Solver::ShortRangePressureKernel kernel_type
std::optional< ShortRangePressureKernel > pair_pressure_kernel() const
std::function< Utils::Matrix< double, 3, 3 >(double, Utils::Vector3d const &, double)> ShortRangePressureKernel
std::function< double(Utils::Vector3d const &, Utils::Vector3d const &, double, Utils::Vector3d const &, double)> ShortRangeEnergyKernel
std::function< Utils::Vector3d(double, Utils::Vector3d const &, double)> ShortRangeForceKernel
std::function< void(Utils::Vector3d const &, Utils::Vector3d const &, Utils::Vector3d &, Utils::Vector3d &, double)> ShortRangeForceCorrectionsKernel
std::optional< ShortRangeForceKernel > pair_force_kernel() const
std::unique_ptr< Implementation > impl
Pointer-to-implementation.
std::optional< ShortRangeEnergyKernel > pair_energy_kernel() const
std::optional< ShortRangeForceCorrectionsKernel > pair_force_elc_kernel() const
The electrostatic method supports pressure calculation.