OGS
GlobalMatrixVectorTypes.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include "SparsityPattern.h"
7
8//
9// Global vector/matrix types and linear solver.
10//
11#if defined(USE_LIS)
12
15
18
19#elif defined(USE_PETSC)
22
25
26#else
29
32
33#endif
34
37static_assert(std::is_integral_v<GlobalMatrix::IndexType>,
38 "The index type for global matrices is not an integral type.");
39static_assert(std::is_integral_v<GlobalVector::IndexType>,
40 "The index type for global vectors is not an integral type.");
41static_assert(std::is_same_v<GlobalMatrix::IndexType, GlobalVector::IndexType>,
42 "The global matrix and vector index types do not match.");
43// Both types are integral types and equal, define a single GlobalIndexType.
45
MathLib::EigenMatrix GlobalMatrix
MathLib::SparsityPattern< GlobalIndexType > GlobalSparsityPattern
MathLib::EigenVector GlobalVector
GlobalMatrix::IndexType GlobalIndexType
RawMatrixType::Index IndexType
Definition EigenMatrix.h:25
Global vector based on Eigen vector.
Definition EigenVector.h:19
Wrapper class for PETSc matrix routines for matrix.
Definition PETScMatrix.h:21
Wrapper class for PETSc vector.
Definition PETScVector.h:28
std::vector< IndexType > SparsityPattern
A vector telling how many nonzeros there are in each global matrix row.