MDStressLab++
MethodLdad.h
Go to the documentation of this file.
1 /*
2  * MethodLdad.h
3  *
4  * Created on: Nov 5, 2019
5  * Modified on: Aug 27, 2022
6  * Author: Nikhil
7  */
8 
9 #ifndef METHODLDADBASE_H_
10 #define METHODLDADBASE_H_
11 
12 #include "Method.h"
13 #include "typedef.h"
14 #include "Trigonometric.h"
15 #include "Constant.h"
16 #include <map>
17 
18 template<typename T>
19 class MethodLdad : public Method<MethodLdad<T>>
20 {
21  friend class Method<MethodLdad<T>>;
22 public:
23  MethodLdad(const Matrix3d& ldadVectors);
24  MethodLdad(const MethodLdad&);
25  virtual ~MethodLdad();
26 
27 protected:
28  double operator()(const Vector3d& vec) const;
29  double bondFunction(const Vector3d& vec1, const Vector3d& vec2) const;
30 
31 private:
32  double normalizer;
33  T oneDFunction;
34  Matrix3d ldadVectors, inverseLdadVectors;
35 };
36 
41 #include "MethodLdad.cpp"
42 
43 // instantiate MethodLdad templates
44 //
45 template class MethodLdad<Constant>;
46 template class MethodLdad<Trigonometric>;
49 
50 #endif /* METHODLDADBASE_H_ */
double operator()(const Vector3d &vec) const
Definition: MethodLdad.cpp:46
virtual ~MethodLdad()
Definition: MethodLdad.cpp:41
MethodLdad< Constant > MethodLdadConstant
Definition: MethodLdad.h:47
double bondFunction(const Vector3d &vec1, const Vector3d &vec2) const
Definition: MethodLdad.cpp:55
Definition: Method.h:14
Eigen::Matrix< double, 1, DIM, Eigen::RowMajor > Vector3d
Definition: typedef.h:60
Eigen::Matrix< double, DIM, DIM, Eigen::RowMajor > Matrix3d
Definition: typedef.h:56
MethodLdad(const Matrix3d &ldadVectors)
Definition: MethodLdad.cpp:16
MethodLdad< Trigonometric > MethodLdadTrigonometric
Definition: MethodLdad.h:48