MDStressLab++
Loading...
Searching...
No Matches
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
51const int DIM= 3;
52typedef std::unique_ptr<double[]> array_dptr;
53typedef std::unique_ptr<int> int_ptr;
54typedef Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> MatrixXd;
55typedef Eigen::Matrix<double,4,4,Eigen::RowMajor> Matrix4d;
56typedef Eigen::Matrix<double,DIM,DIM,Eigen::RowMajor> Matrix3d;
57typedef Eigen::Matrix<int,DIM,DIM,Eigen::RowMajor> Matrix3i;
58typedef Eigen::Matrix<int,1,Eigen::Dynamic,Eigen::RowMajor> VectorXi;
59typedef Eigen::Matrix<double,1,Eigen::Dynamic,Eigen::RowMajor> VectorXd;
60typedef Eigen::Matrix<double,1,DIM,Eigen::RowMajor> Vector3d;
61typedef Eigen::Matrix<int,1,DIM,Eigen::RowMajor> Vector3i;
62typedef Eigen::Array<double,Eigen::Dynamic,Eigen::Dynamic> ArrayXXd;
67
72
73const double epsilon= 1e-8;
74
75
76
77
78#endif /* TYPEDEF_H_ */
std::unique_ptr< double[]> array_dptr
Definition typedef.h:52
const int DIM
Definition typedef.h:51
Eigen::Matrix< double, DIM, DIM, Eigen::RowMajor > Matrix3d
Definition typedef.h:56
Eigen::Matrix< int, 1, Eigen::Dynamic, Eigen::RowMajor > VectorXi
Definition typedef.h:58
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixXd
Definition typedef.h:54
std::unique_ptr< int > int_ptr
Definition typedef.h:53
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor > VectorXd
Definition typedef.h:59
Eigen::Matrix< double, 1, DIM, Eigen::RowMajor > Vector3d
Definition typedef.h:60
Eigen::Matrix< int, 1, DIM, Eigen::RowMajor > Vector3i
Definition typedef.h:61
Eigen::Matrix< double, 4, 4, Eigen::RowMajor > Matrix4d
Definition typedef.h:55
Eigen::Matrix< int, DIM, DIM, Eigen::RowMajor > Matrix3i
Definition typedef.h:57
StressType
Definition typedef.h:63
@ Cauchy
Definition typedef.h:64
@ Piola
Definition typedef.h:65
ConfigType
Definition typedef.h:68
@ Current
Definition typedef.h:70
@ Reference
Definition typedef.h:69
const double epsilon
Definition typedef.h:73
Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic > ArrayXXd
Definition typedef.h:62