OGS 6.2.1-97-g73d1aeda3
MatrixVectorTraits.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <memory>
13 #include "MatrixSpecifications.h"
14 
15 namespace MathLib
16 {
17 template<typename Matrix>
19 }
20 
21 #define SPECIALIZE_MATRIX_VECTOR_TRAITS(MATVEC, IDX) \
22  template<> struct MatrixVectorTraits<MATVEC> { \
23  using Index = IDX; \
24  static std::unique_ptr<MATVEC> newInstance(); \
25  static std::unique_ptr<MATVEC> newInstance(MATVEC const& A); \
26  static std::unique_ptr<MATVEC> newInstance(MatrixSpecifications const& spec); \
27  };
28 
29 
30 #ifdef USE_PETSC
31 
34 
35 namespace MathLib
36 {
39 }
40 
41 
42 #elif defined(OGS_USE_EIGEN)
43 
46 
47 namespace MathLib
48 {
51 }
52 
53 #endif
54 
55 #undef SPECIALIZE_MATRIX_VECTOR_TRAITS
#define SPECIALIZE_MATRIX_VECTOR_TRAITS(MATVEC, IDX)
RawMatrixType::Index IndexType
Definition: EigenMatrix.h:33
Eigen::SparseMatrix< double >::Index IndexType
Definition: EigenVector.h:33
Declaration of class PETScMatrix, which provides an interface to PETSc matrix routines.
Declaration of class PETScVector, which provides an interface to PETSc vector routines.