48#ifdef ESPRESSO_DIPOLES
56 auto const &actor = *ptr;
60#ifdef ESPRESSO_DIPOLE_FIELD_TRACKING
64 return actor.pair_force(d1d2, dip1, dip2,
65#ifdef ESPRESSO_DIPOLE_FIELD_TRACKING
66 dip_fld_p1, dip_fld_p2,
74 operator()(std::shared_ptr<DipolarLayerCorrection>
const &ptr)
const {
75 return std::visit(*
this, ptr->base_solver);
85#ifdef ESPRESSO_DIPOLES
93 auto const &actor = *ptr;
97 return actor.pair_energy(dip1, dip2, d, dist, dist2);
103 operator()(std::shared_ptr<DipolarLayerCorrection>
const &ptr)
const {
104 return std::visit(*
this, ptr->base_solver);
114#ifdef ESPRESSO_DIPOLES
115 template <
typename T>
123 [&actor = std::as_const(*ptr)
124#ifdef ESPRESSO_DIPOLE_FIELD_TRACKING
133 auto const pf = actor.pair_force(d1d2, dip1, dip2,
134#ifdef ESPRESSO_DIPOLE_FIELD_TRACKING
135 dip_fld_p1, dip_fld_p2,
144 operator()(std::shared_ptr<DipolarLayerCorrection>
const &ptr)
const {
145 return std::visit(*
this, ptr->base_solver);
150inline std::optional<Solver::ShortRangeForceKernel>
152#ifdef ESPRESSO_DIPOLES
153 if (
auto &solver =
impl->solver; solver.has_value()) {
155 return std::visit(visitor, *solver);
161inline std::optional<Solver::ShortRangeEnergyKernel>
163#ifdef ESPRESSO_DIPOLES
164 if (
auto &solver =
impl->solver; solver.has_value()) {
166 return std::visit(visitor, *solver);
172inline std::optional<Solver::ShortRangePressureKernel>
174#ifdef ESPRESSO_DIPOLES
175 if (
auto &solver =
impl->solver; solver.has_value()) {
177 return std::visit(visitor, *solver);
Vector implementation and trait types for boost qvm interoperability.
P3M algorithm for long-range magnetic dipole-dipole interaction.
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 &) const
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< DipolarLayerCorrection > const &ptr) const
Solver::ShortRangeEnergyKernel kernel_type
result_type operator()(std::shared_ptr< DipolarP3M > const &ptr) const
result_type operator()(std::shared_ptr< DipolarLayerCorrection > const &ptr) const
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< T > const &) const
Solver::ShortRangeForceKernel kernel_type
result_type operator()(std::shared_ptr< DipolarP3M > const &ptr) const
Solver::ShortRangePressureKernel kernel_type
result_type operator()(std::shared_ptr< DipolarLayerCorrection > const &ptr) const
result_type operator()(std::shared_ptr< T > const &) const
result_type operator()(std::shared_ptr< DipolarP3M > const &ptr) const
std::optional< kernel_type > result_type
std::function< ParticleForce(double, Utils::Vector3d const &, Utils::Vector3d const &, Utils::Vector3d &, Utils::Vector3d &, Utils::Vector3d const &, double, double)> ShortRangeForceKernel
std::optional< ShortRangeForceKernel > pair_force_kernel() const
std::function< double(Utils::Vector3d const &, Utils::Vector3d const &, Utils::Vector3d const &, double, double)> ShortRangeEnergyKernel
std::unique_ptr< Implementation > impl
Pointer-to-implementation.
std::optional< ShortRangePressureKernel > pair_pressure_kernel() const
std::optional< ShortRangeEnergyKernel > pair_energy_kernel() const
std::function< Utils::Matrix< double, 3, 3 >(double, Utils::Vector3d const &, Utils::Vector3d const &, Utils::Vector3d const &, double, double)> ShortRangePressureKernel