MDStressLab++
typedef.h
Go to the documentation of this file.
1 /*
2  * typedef.h
3  *
4  * Created on: Nov 6, 2019
5  * Author: Nikhil
6  */
7 
8 #ifndef TYPEDEF_H_
9 #define TYPEDEF_H_
10 
11 #include <iomanip>
12 #include <string>
13 #include <iostream>
14 #include "Eigen/Eigen/Dense"
15 #include <memory>
16 
17 #define MY_ERROR(message) \
18  { \
19  std::cout << "* Error : \"" << message << "\" : " << __LINE__ << ":" \
20  << __FILE__ << std::endl; \
21  exit(1); \
22  }
23 
24 #define MY_WARNING(message) \
25  { \
26  std::cout << "* Warning : \"" << message << "\" : " << __LINE__ << ":" \
27  << __FILE__ << std::endl; \
28  }
29 
30 #define MY_BANNER(announcement) \
31  { \
32  std::cout << "--------------------------------------------------------------------------------" << "\n";\
33  std::cout << std::setw(40+strlen(announcement)/2)<< announcement << "\n";\
34  std::cout << "--------------------------------------------------------------------------------" << "\n";\
35  }
36 #define MY_HEADING(heading) \
37 { \
38  std::cout << "\n"; \
39  std::cout << heading << "\n"; \
40  std::cout << std::string(strlen(heading),'-')<< "\n"; \
41 }
42 #define MY_LINE(message) \
43 { \
44  std::cout << message << "\n"; \
45 }
46 #define MY_SUBLINE(message) \
47 { \
48  std::cout << " " << message << "\n"; \
49 }
50 
51 const int DIM= 3;
52 typedef std::unique_ptr<double[]> array_dptr;
53 typedef std::unique_ptr<int> int_ptr;
54 typedef Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> MatrixXd;
55 typedef Eigen::Matrix<double,4,4,Eigen::RowMajor> Matrix4d;
56 typedef Eigen::Matrix<double,DIM,DIM,Eigen::RowMajor> Matrix3d;
57 typedef Eigen::Matrix<int,DIM,DIM,Eigen::RowMajor> Matrix3i;
58 typedef Eigen::Matrix<int,1,Eigen::Dynamic,Eigen::RowMajor> VectorXi;
59 typedef Eigen::Matrix<double,1,Eigen::Dynamic,Eigen::RowMajor> VectorXd;
60 typedef Eigen::Matrix<double,1,DIM,Eigen::RowMajor> Vector3d;
61 typedef Eigen::Matrix<int,1,DIM,Eigen::RowMajor> Vector3i;
62 typedef Eigen::Array<double,Eigen::Dynamic,Eigen::Dynamic> ArrayXXd;
63 enum StressType {
66 };
67 
68 enum ConfigType {
71 };
72 
73 const double epsilon= 1e-8;
74 
75 
76 
77 
78 #endif /* TYPEDEF_H_ */
const double epsilon
Definition: typedef.h:73
StressType
Definition: typedef.h:63
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor > VectorXd
Definition: typedef.h:59
Eigen::Matrix< double, 4, 4, Eigen::RowMajor > Matrix4d
Definition: typedef.h:55
ConfigType
Definition: typedef.h:68
Eigen::Matrix< double, 1, DIM, Eigen::RowMajor > Vector3d
Definition: typedef.h:60
std::unique_ptr< int > int_ptr
Definition: typedef.h:53
Definition: typedef.h:64
Eigen::Matrix< double, DIM, DIM, Eigen::RowMajor > Matrix3d
Definition: typedef.h:56
std::unique_ptr< double[]> array_dptr
Definition: typedef.h:52
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixXd
Definition: typedef.h:54
Eigen::Matrix< int, DIM, DIM, Eigen::RowMajor > Matrix3i
Definition: typedef.h:57
const int DIM
Definition: typedef.h:51
Eigen::Matrix< int, 1, DIM, Eigen::RowMajor > Vector3i
Definition: typedef.h:61
Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic > ArrayXXd
Definition: typedef.h:62
Definition: typedef.h:65
Eigen::Matrix< int, 1, Eigen::Dynamic, Eigen::RowMajor > VectorXi
Definition: typedef.h:58