MAST
mast_data_types.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast__data_types__
21 #define __mast__data_types__
22 
23 // libMesh includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/dense_matrix.h"
26 #include "libmesh/dense_vector.h"
27 
28 // Eigen includes
29 #include "Eigen/Dense"
30 using namespace Eigen;
31 
34 
35 typedef Matrix<Real, Dynamic, 1> RealVectorX;
36 typedef Matrix<Real, 3, 1> RealVector3;
37 typedef Matrix<Complex, Dynamic, 1> ComplexVectorX;
38 typedef Matrix<Complex, 3, 1> ComplexVector3;
39 template <typename ValType> struct VectorType{typedef void return_type;};
40 template < > struct VectorType<Real> {typedef RealVectorX return_type;};
41 template < > struct VectorType<Complex> {typedef ComplexVectorX return_type;};
42 
43 
44 typedef Matrix<Real, Dynamic, Dynamic> RealMatrixX;
45 typedef Matrix<Real, 3, 3> RealMatrix3;
46 typedef Matrix<Complex, Dynamic, Dynamic> ComplexMatrixX;
47 typedef Matrix<Complex, 3, 3> ComplexMatrix3;
48 template <typename ValType> struct MatrixType{typedef void return_type;};
49 template < > struct MatrixType<Real> {typedef RealMatrixX return_type;};
50 template < > struct MatrixType<Complex> {typedef ComplexMatrixX return_type;};
51 
52 
53 typedef libMesh::DenseMatrix<Real> DenseRealMatrix;
54 typedef libMesh::DenseMatrix<Complex> DenseComplexMatrix;
55 
56 typedef libMesh::DenseVector<Real> DenseRealVector;
57 typedef libMesh::DenseVector<Complex> DenseComplexVector;
58 
59 #endif // __mast__data_types__
Matrix< Complex, 3, 3 > ComplexMatrix3
Matrix< Real, 3, 1 > RealVector3
libMesh::DenseMatrix< Real > DenseRealMatrix
ComplexVectorX return_type
Matrix< Complex, Dynamic, 1 > ComplexVectorX
libMesh::Real Real
libMesh::Complex Complex
RealMatrixX return_type
libMesh::DenseVector< Real > DenseRealVector
RealVectorX return_type
ComplexMatrixX return_type
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
libMesh::DenseMatrix< Complex > DenseComplexMatrix
Matrix< Real, Dynamic, 1 > RealVectorX
libMesh::DenseVector< Complex > DenseComplexVector
Matrix< Real, 3, 3 > RealMatrix3
Matrix< Complex, 3, 1 > ComplexVector3