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