MDStressLab++
Loading...
Searching...
No Matches
MethodSphere.h
Go to the documentation of this file.
1/*
2 * MethodSphere.h
3 *
4 * Created on: Nov 5, 2019
5 * Author: Nikhil
6 */
7
8#ifndef METHODSPHERE_H_
9#define METHODSPHERE_H_
10
11#include "Method.h"
12#include "typedef.h"
13#include "Polynomial.h"
14#include <map>
15
28class MethodSphere : public Method<MethodSphere>
29{
30 friend class Method<MethodSphere>;
31
32public:
60 explicit MethodSphere(double, const std::string& type="virial");
61
80 MethodSphere(double, std::map<double,double>);
82 virtual ~MethodSphere();
83
84protected:
90 double operator()(const Vector3d& vec) const;
91
100 double bondFunction(const Vector3d& vec1, const Vector3d& vec2) const;
101
102
103private:
104 std::map<std::pair<double,double>,Polynomial> piecewisePolynomial;
105 double normalizer;
106 double integratePolynomial(const int&, const double&,const double&,const double&,const double&) const;
107 double integrate(const double&,const double&,const double&,const double&) const;
108};
109
177#endif /* METHODSPHERE_H_ */
Implements radially symmetric weighting functions (Hardy, Virial) and its associated bond function fo...
double operator()(const Vector3d &vec) const
Evaluate the weighting function at a vector.
double bondFunction(const Vector3d &vec1, const Vector3d &vec2) const
Computes the bond function for a pair of atomic positions.
virtual ~MethodSphere()
Eigen::Matrix< double, 1, DIM, Eigen::RowMajor > Vector3d
Definition typedef.h:60