OGS
AssembledMatrixCache.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 <memory>
7
10
11namespace ProcessLib
12{
15{
17 std::tuple<GlobalMatrix&, GlobalMatrix&, GlobalVector&> MKb() const
18 {
19 return std::tie(*M_, *K_, *b_);
20 }
21
23 bool hasMKb() const { return M_ && K_ && b_; }
24
34
35private:
36 std::unique_ptr<GlobalMatrix> M_;
37 std::unique_ptr<GlobalMatrix> K_;
38 std::unique_ptr<GlobalVector> b_;
39};
40} // namespace ProcessLib
MathLib::EigenMatrix GlobalMatrix
MathLib::EigenVector GlobalVector
Stores assembled global M, K, b matrices/vectors for later reuse.
std::unique_ptr< GlobalMatrix > M_
void storeMKb(GlobalMatrix const &M, GlobalMatrix const &K, GlobalVector const &b)
Store data.
bool hasMKb() const
Check if data has been stored.
std::unique_ptr< GlobalMatrix > K_
std::unique_ptr< GlobalVector > b_
std::tuple< GlobalMatrix &, GlobalMatrix &, GlobalVector & > MKb() const
Access the stored data.