8 #ifndef SPARROW_MULTIPOLEMULTIPOLEINTERACTION_H
9 #define SPARROW_MULTIPOLEMULTIPOLEINTERACTION_H
42 template<Utils::DerivativeOrder O>
43 Utils::AutomaticDifferentiation::Value1DType<O>
calculate(
double R,
double D1,
double d2,
double squaredRhos)
const {
44 auto sum = Utils::AutomaticDifferentiation::constant1D<O>(0);
45 for (
const auto& t : terms_) {
46 sum += t.calculate<O>(R, D1, d2, squaredRhos);
59 unsigned int size()
const {
60 return static_cast<unsigned int>(terms_.size());
64 std::list<MultipoleMultipoleTerm> terms_;
73 #endif // SPARROW_MULTIPOLEMULTIPOLEINTERACTION_H
This header-only class performs the actual calculation of the multipole-multipole interaction...
Definition: MultipoleMultipoleInteraction.h:29
unsigned int size() const
gets the current size of the std::list<MultipoleMultipoleTerm> containing the charge configurations ...
Definition: MultipoleMultipoleInteraction.h:59
void add(const MultipoleMultipoleTerm &m)
add an interaction between two charges in the multipoles to the total interaction ...
Definition: MultipoleMultipoleInteraction.h:55
Utils::AutomaticDifferentiation::Value1DType< O > calculate(double R, double D1, double d2, double squaredRhos) const
calculates the complete interaction between two multipoles whose single interactions have been stored...
Definition: MultipoleMultipoleInteraction.h:43
This header-only class defines an object for the calculation of an interaction between two charges in...
Definition: MultipoleMultipoleTerm.h:32