Skip to content

Commit

Permalink
Added TPZFYsmpMatrix::GetData for sparse matrix data access
Browse files Browse the repository at this point in the history
  • Loading branch information
orlandini committed Sep 27, 2021
1 parent 6cabfbb commit f957b35
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Matrix/pzysmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ class TPZFYsmpMatrix : public TPZMatrix<TVar> {

/** @brief Pass the data to the class. */
virtual void SetData( TPZVec<int64_t> &IA, TPZVec<int64_t> &JA, TPZVec<TVar> &A );

/** @brief Get the data from the class*/
virtual void GetData(TPZVec<int64_t> &IA, TPZVec<int64_t> &JA, TPZVec<TVar> &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;

Expand Down Expand Up @@ -279,4 +280,11 @@ inline void TPZFYsmpMatrix<TVar>::SetData( TPZVec<int64_t> &IA, TPZVec<int64_t>
fA = A;
}

template<class TVar>
inline void TPZFYsmpMatrix<TVar>::GetData( TPZVec<int64_t> &IA, TPZVec<int64_t> &JA, TPZVec<TVar> &A ){
IA = fIA;
JA = fJA;
A = fA;
}

#endif

0 comments on commit f957b35

Please sign in to comment.