Deprecate "copyData" method of array classes
This commit is contained in:
parent
24c509f539
commit
eb71d8cdd0
6 changed files with 7 additions and 1 deletions
|
|
@ -128,8 +128,10 @@ public:
|
|||
/*!
|
||||
* This differs from the assignment operator as no resizing is done and memcpy() is used.
|
||||
* @param y Array to be copied
|
||||
* @deprecated To be removed after Cantera 2.2.
|
||||
*/
|
||||
void copyData(const Array2D& y) {
|
||||
warn_deprecated("Array2D::copyData", "To be removed after Cantera 2.2.");
|
||||
size_t n = sizeof(doublereal) * m_nrows * m_ncols;
|
||||
(void) memcpy(DATA_PTR(m_data), y.ptrColumn(0), n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ public:
|
|||
/*!
|
||||
* This differs from the assignment operator as no resizing is done and memcpy() is used.
|
||||
* @param y Array to be copied
|
||||
* @deprecated To be removed after Cantera 2.2.
|
||||
*/
|
||||
virtual void copyData(const GeneralMatrix& y);
|
||||
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ public:
|
|||
/*!
|
||||
* This differs from the assignment operator as no resizing is done and memcpy() is used.
|
||||
* @param y Array to be copied
|
||||
* @deprecated To be removed after Cantera 2.2.
|
||||
*/
|
||||
virtual void copyData(const GeneralMatrix& y) = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ public:
|
|||
return Array2D::operator()(i, j);
|
||||
}
|
||||
|
||||
//! @deprecated To be removed after Cantera 2.2.
|
||||
virtual void copyData(const GeneralMatrix& y);
|
||||
|
||||
virtual doublereal operator()(size_t i, size_t j) const {
|
||||
|
|
|
|||
|
|
@ -433,6 +433,7 @@ doublereal* const* BandMatrix::colPts()
|
|||
|
||||
void BandMatrix::copyData(const GeneralMatrix& y)
|
||||
{
|
||||
warn_deprecated("BandMatrix::copyData", "To be removed after Cantera 2.2.");
|
||||
m_factored = false;
|
||||
size_t n = sizeof(doublereal) * m_n * (2 *m_kl + m_ku + 1);
|
||||
GeneralMatrix* yyPtr = const_cast<GeneralMatrix*>(&y);
|
||||
|
|
|
|||
|
|
@ -3507,7 +3507,7 @@ int NonlinearSolver::beuler_jac(GeneralMatrix& J, doublereal* const f,
|
|||
* Make a copy of the data. Note, this jacobian copy occurs before any matrix scaling operations.
|
||||
* It's the raw matrix producted by this routine.
|
||||
*/
|
||||
jacCopyPtr_->copyData(J);
|
||||
*jacCopyPtr_ = J;
|
||||
|
||||
return retn;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue