2#ifndef STORMM_LAYERED_POTENTIAL_H
3#define STORMM_LAYERED_POTENTIAL_H
6#include "Accelerator/hybrid.h"
7#include "Math/formulas.h"
8#include "Math/log_scale_spline.h"
9#include "Math/matrix_ops.h"
10#include "Potential/pme_util.h"
11#include "Structure/structure_enumerators.h"
12#include "energy_enumerators.h"
13#include "layered_potential_metrics.h"
19using card::HybridTargetLevel;
20using energy::elecPMEDirectSpace;
22using stmath::sigmoidf;
23using stmath::LogScaleSpline;
24using stmath::LogSplineTable;
25using stmath::qrSolver;
49 NrgLayerKit(
const NrgLayerKit &original) =
default;
50 NrgLayerKit(NrgLayerKit &&original) =
default;
51 NrgLayerKit& operator=(
const NrgLayerKit &original) =
default;
52 NrgLayerKit& operator=(NrgLayerKit &&original) =
default;
153 HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
157 std::vector<LogScaleSpline<T4>> spline_tables;
158 std::vector<double4> smoothing_coefficients;
164 void validateLayerIndex(
int layer_index,
const char* caller =
nullptr)
const;
169 void solveLayerCoefficients();
175#include "layered_potential.tpp"
Collect the details needed to formulate a layered potential, including the length of each layer's cut...
Definition layered_potential_metrics.h:33
LayeredPotential(const LayeredPotential &original)=default
So long as the nested parameters manager and LogScaleSpline objects copy and move correctly,...
T getAnalyticDerivative(int layer, T r, T r2=-1.0, int order=1) const
Get the value of the potential derivative at a specified layer and distance, using analytic calculati...
T getSplinedDerivative(int layer, T r, T r2=-1.0, int order=1) const
Get the value of the potential derivative at a specified layer and distance, making use of an interna...
T getAnalyticValue(int layer, T r, T r2=-1.0) const
Compute the value of one of the potential functions, using analytic expressions, at a specified layer...
LayeredPotential(const LayeredPotentialMetrics ¶meters_in=LayeredPotentialMetrics())
The constructor requires an enumeration to specify a particular potential form as well as a rough und...
const LayeredPotentialMetrics & getParameters() const
Get a const reference to the underlying metrics, to view specifications such as the cutoff at a parti...
double4 getSmoothingCoefficients(int layer) const
Obtain the quartet of coefficients for one of the layers.
const NrgLayerKit< T4 > data(int layer_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a read-only abstract for the object, gear towards a specific layer of the potential....
T getSplinedValue(int layer, T r, T r2=-1.0) const
Get the value of one of the potential functions at a specified layer and distance,...
The abstract of the LayeredPotential class provides only one of the layers. Kernels can be called wit...
Definition layered_potential.h:34
Definition stormm_vector_types.h:123
Abstract for the logarithmic splined function object, containing the table and critical constants for...
Definition log_scale_spline.h:46