MDStressLab++
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 
16 class MethodSphere : public Method<MethodSphere>
17 {
18  friend class Method<MethodSphere>;
19 
20 public:
21  MethodSphere(double, std::string);
22  MethodSphere(double, std::map<double,double>);
23  MethodSphere(const MethodSphere&);
24  virtual ~MethodSphere();
25 
26 protected:
27  double operator()(const Vector3d& vec) const;
28  double bondFunction(const Vector3d& vec1, const Vector3d& vec2) const;
29 
30 
31 private:
32  std::map<std::pair<double,double>,Polynomial> piecewisePolynomial;
33  double normalizer;
34  double integratePolynomial(const int&, const double&,const double&,const double&,const double&) const;
35  double integrate(const double&,const double&,const double&,const double&) const;
36 };
37 
38 #endif /* METHODSPHERE_H_ */
double bondFunction(const Vector3d &vec1, const Vector3d &vec2) const
double operator()(const Vector3d &vec) const
virtual ~MethodSphere()
MethodSphere(double, std::string)
Definition: Method.h:14
Eigen::Matrix< double, 1, DIM, Eigen::RowMajor > Vector3d
Definition: typedef.h:60