ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
forces_cabana.hpp File Reference
#include <config/config.hpp>
#include "aosoa_pack.hpp"
#include "forces_inline.hpp"
#include "short_range_cabana_helpers.hpp"
#include <utils/Vector.hpp>
#include <Cabana_Core.hpp>
#include <Kokkos_ScatterView.hpp>
#include <cstddef>
#include <memory>
#include <optional>
#include <variant>
#include <vector>
+ Include dependency graph for forces_cabana.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ForcesKernel
 
struct  SpecializedForcesKernel< HasCoulomb >
 Own-the-loop specialization of the non-bonded pair kernel. More...
 

Functions

CoulombP3M constget_toplevel_p3m_solver (Coulomb::Solver const &coulomb)
 The active P3M solver, or nullptr.
 
ESPRESSO_ATTR_ALWAYS_INLINE Utils::Vector3d coulomb_pair_force (double q1q2, Utils::Vector3d const &d, double dist, Coulomb::ShortRangeForceKernel::kernel_type const *coulomb_kernel, CoulombP3M const *p3m)
 Real-space charge-charge pair force: the P3M fast path when the solver is (top-level) P3M, the type-erased coulomb kernel otherwise.
 

Variables

constexpr unsigned specialized_kernel_pair_mask
 Pair potentials fully handled by SpecializedForcesKernel, i.e.
 

Function Documentation

◆ coulomb_pair_force()

ESPRESSO_ATTR_ALWAYS_INLINE Utils::Vector3d coulomb_pair_force ( double  q1q2,
Utils::Vector3d const d,
double  dist,
Coulomb::ShortRangeForceKernel::kernel_type const coulomb_kernel,
CoulombP3M const p3m 
)
inline

Real-space charge-charge pair force: the P3M fast path when the solver is (top-level) P3M, the type-erased coulomb kernel otherwise.

Shared by ForcesKernel and SpecializedForcesKernel so the dispatch cannot drift between them.

Definition at line 63 of file forces_cabana.hpp.

References stream.

Referenced by SpecializedForcesKernel< HasCoulomb >::operator()(), and ForcesKernel::operator()().

◆ get_toplevel_p3m_solver()

CoulombP3M const * get_toplevel_p3m_solver ( Coulomb::Solver const coulomb)
inline

The active P3M solver, or nullptr.

Deliberately checks only the top level of the solver variant (unlike get_actor_by_type, which recurses into layer corrections): under ELC the pair force must go through the generic coulomb kernel plus the ELC corrections, not the bare P3M fast path.

Definition at line 47 of file forces_cabana.hpp.

References Coulomb::Solver::impl.

Referenced by create_specialized_verlet_pair_loop(), and ForcesKernel::ForcesKernel().

Variable Documentation

◆ specialized_kernel_pair_mask

constexpr unsigned specialized_kernel_pair_mask
constexpr
Initial value:

Pair potentials fully handled by SpecializedForcesKernel, i.e.

exactly the central-radial family dispatched through calc_central_radial_force. Potentials with their own branch in ForcesKernel (Gay-Berne, DPD) are deliberately absent, and so is any newly added potential until it is proven compatible – the dispatch gate in forces.cpp rejects any pair mask with a bit outside this allowlist, so new potentials fall back to the generic kernel by default.

Definition at line 371 of file forces_cabana.hpp.

Referenced by create_specialized_verlet_pair_loop().