KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
linear_solvers_define.h
Go to the documentation of this file.
1 /* KRATOS _ _ ____ _
2 // | | (_)_ __ ___ __ _ _ __/ ___| ___ | |_ _____ _ __ ___
3 // | | | | '_ \ / _ \/ _` | '__\___ \ / _ \| \ \ / / _ \ '__/ __|
4 // | |___| | | | | __/ (_| | | ___) | (_) | |\ V / __/ | \__ |
5 // |_____|_|_| |_|\___|\__,_|_| |____/ \___/|_| \_/ \___|_| |___/ Application
6 //
7 // Author: Armin Geiser
8 */
9 
10 
11 
12 #if !defined(KRATOS_LINEARSOLVERS_DEFINE_H_INCLUDED)
13 #define KRATOS_LINEARSOLVERS_DEFINE_H_INCLUDED
14 
15 // External includes
16 #include <Eigen/Core>
17 #include <Eigen/Sparse>
18 
19 namespace Kratos
20 {
21 
22 // IMPORTANT:
23 //
24 // The matrices in Kratos use row-major storage ordering.
25 // Eigen matrices, however, use column-major storage ordering by default.
26 //
27 // If these two worlds are combined, it is crucial that Eigen matrices are used
28 // with **row-major** storage order to match the Kratos matrices!
29 //
30 // To simplify things, the most commonly used types are defined below:
31 
32 template<typename _Scalar> using EigenDynamicMatrix = Eigen::Matrix<_Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
33 template<typename _Scalar> using EigenDynamicVector = Eigen::Matrix<_Scalar, Eigen::Dynamic, 1>;
34 
35 template<typename _Scalar> using EigenSparseMatrix = Eigen::SparseMatrix<_Scalar, Eigen::RowMajor, int>;
36 
37 } // namespace Kratos
38 
39 #endif // defined(KRATOS_LINEARSOLVERS_DEFINE_H_INCLUDED)
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Eigen::Matrix< _Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > EigenDynamicMatrix
Definition: linear_solvers_define.h:32
Eigen::SparseMatrix< _Scalar, Eigen::RowMajor, int > EigenSparseMatrix
Definition: linear_solvers_define.h:35
Eigen::Matrix< _Scalar, Eigen::Dynamic, 1 > EigenDynamicVector
Definition: linear_solvers_define.h:33