From f957b35be42725fdc81ff183a821e02815c62069 Mon Sep 17 00:00:00 2001 From: Francisco Orlandini Date: Thu, 23 Sep 2021 23:51:52 -0300 Subject: [PATCH] Added TPZFYsmpMatrix::GetData for sparse matrix data access --- Matrix/pzysmp.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Matrix/pzysmp.h b/Matrix/pzysmp.h index 07e55cdbaa..2465f45e33 100644 --- a/Matrix/pzysmp.h +++ b/Matrix/pzysmp.h @@ -122,7 +122,8 @@ class TPZFYsmpMatrix : public TPZMatrix { /** @brief Pass the data to the class. */ virtual void SetData( TPZVec &IA, TPZVec &JA, TPZVec &A ); - + /** @brief Get the data from the class*/ + virtual void GetData(TPZVec &IA, TPZVec &JA, TPZVec &A); /** @brief Print the matrix along with a identification title */ virtual void Print(const char *title, std::ostream &out = std::cout , const MatrixOutputFormat form = EFormatted) const override; @@ -279,4 +280,11 @@ inline void TPZFYsmpMatrix::SetData( TPZVec &IA, TPZVec fA = A; } +template +inline void TPZFYsmpMatrix::GetData( TPZVec &IA, TPZVec &JA, TPZVec &A ){ + IA = fIA; + JA = fJA; + A = fA; +} + #endif