OGS
MatrixVectorTraits.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <memory>
15
16namespace MathLib
17{
18template<typename Matrix>
20}
21
22#define SPECIALIZE_MATRIX_VECTOR_TRAITS(MATVEC, IDX) \
23 template <> \
24 struct MatrixVectorTraits<MATVEC> \
25 { \
26 using Index = IDX; \
27 static std::unique_ptr<MATVEC> newInstance(); \
28 static std::unique_ptr<MATVEC> newInstance(MATVEC const& A); \
29 static std::unique_ptr<MATVEC> newInstance( \
30 MatrixSpecifications const& spec); \
31 static std::unique_ptr<MATVEC> newInstance(Index const length); \
32 };
33
34#ifdef USE_PETSC
35
38
39namespace MathLib
40{
43}
44
45
46#else
47
50
51namespace MathLib
52{
55}
56
57#endif
58
59#undef SPECIALIZE_MATRIX_VECTOR_TRAITS
#define SPECIALIZE_MATRIX_VECTOR_TRAITS(MATVEC, IDX)
Declaration of class PETScMatrix, which provides an interface to PETSc matrix routines.
Declaration of class PETScVector, which provides an interface to PETSc vector routines.
RawMatrixType::Index IndexType
Definition EigenMatrix.h:31
Eigen::SparseMatrix< double >::Index IndexType
Definition EigenVector.h:32
Wrapper class for PETSc matrix routines for matrix.
Definition PETScMatrix.h:32
Wrapper class for PETSc vector.
Definition PETScVector.h:33