OGS
ProcessLib::AssembledMatrixCache Struct Referencefinal

Detailed Description

Stores assembled global M, K, b matrices/vectors for later reuse.

Definition at line 14 of file AssembledMatrixCache.h.

#include <AssembledMatrixCache.h>

Public Member Functions

std::tuple< GlobalMatrix &, GlobalMatrix &, GlobalVector & > MKb () const
 Access the stored data.
bool hasMKb () const
 Check if data has been stored.
void storeMKb (GlobalMatrix const &M, GlobalMatrix const &K, GlobalVector const &b)
 Store data.

Private Attributes

std::unique_ptr< GlobalMatrixM_
std::unique_ptr< GlobalMatrixK_
std::unique_ptr< GlobalVectorb_

Member Function Documentation

◆ hasMKb()

bool ProcessLib::AssembledMatrixCache::hasMKb ( ) const
inline

Check if data has been stored.

Definition at line 23 of file AssembledMatrixCache.h.

23{ return M_ && K_ && b_; }
std::unique_ptr< GlobalMatrix > M_
std::unique_ptr< GlobalMatrix > K_
std::unique_ptr< GlobalVector > b_

References b_, K_, and M_.

◆ MKb()

std::tuple< GlobalMatrix &, GlobalMatrix &, GlobalVector & > ProcessLib::AssembledMatrixCache::MKb ( ) const
inline

Access the stored data.

Definition at line 17 of file AssembledMatrixCache.h.

18 {
19 return std::tie(*M_, *K_, *b_);
20 }

References b_, K_, and M_.

◆ storeMKb()

void ProcessLib::AssembledMatrixCache::storeMKb ( GlobalMatrix const & M,
GlobalMatrix const & K,
GlobalVector const & b )
inline

Store data.

Definition at line 26 of file AssembledMatrixCache.h.

29 {
30 M_ = MathLib::MatrixVectorTraits<GlobalMatrix>::newInstance(M);
31 K_ = MathLib::MatrixVectorTraits<GlobalMatrix>::newInstance(K);
32 b_ = MathLib::MatrixVectorTraits<GlobalVector>::newInstance(b);
33 }

References b_, K_, and M_.

Referenced by ProcessLib::AssemblyMixin< Process >::assembleOnBulkMeshOrOnSubmeshCommon().

Member Data Documentation

◆ b_

std::unique_ptr<GlobalVector> ProcessLib::AssembledMatrixCache::b_
private

Definition at line 38 of file AssembledMatrixCache.h.

Referenced by hasMKb(), MKb(), and storeMKb().

◆ K_

std::unique_ptr<GlobalMatrix> ProcessLib::AssembledMatrixCache::K_
private

Definition at line 37 of file AssembledMatrixCache.h.

Referenced by hasMKb(), MKb(), and storeMKb().

◆ M_

std::unique_ptr<GlobalMatrix> ProcessLib::AssembledMatrixCache::M_
private

Definition at line 36 of file AssembledMatrixCache.h.

Referenced by hasMKb(), MKb(), and storeMKb().


The documentation for this struct was generated from the following file: