Remove m_iter variable and deprecate setIterator function

Remove m_iter variable and deprecate setIterator function
because only Newton (CV_NEWTON) iteration method is used.
This commit is contained in:
band-a-prend 2019-08-03 12:46:59 +03:00 committed by Ray Speth
parent 6a8d7f7de3
commit 1606ce1565
5 changed files with 6 additions and 32 deletions

View file

@ -51,9 +51,6 @@ public:
m_maxord = n;
}
virtual void setMethod(MethodType t);
#if CT_SUNDIALS_VERSION < 40
virtual void setIterator(IterType t);
#endif
virtual void setMaxStepSize(double hmax);
virtual void setMinStepSize(double hmin);
virtual void setMaxSteps(int nmax);

View file

@ -175,12 +175,11 @@ public:
warn("setMethodType");
}
#if CT_SUNDIALS_VERSION < 40
//! Set the linear iterator.
virtual void setIterator(IterType t) {
warn("setInterator");
}
#endif
//! Set the linear iterator.
//! @deprecated Unused. To be removed after Cantera 2.5.
virtual void setIterator(IterType t) {
warn_deprecated("Integrator::setIterator", "To be removed after Cantera 2.5.");
}
//! Set the maximum step size
virtual void setMaxStepSize(double hmax) {

View file

@ -84,9 +84,6 @@ ImplicitSurfChem::ImplicitSurfChem(
// numerically, and use a Newton linear iterator
m_integ->setMethod(BDF_Method);
m_integ->setProblemType(DENSE + NOJAC);
#if CT_SUNDIALS_VERSION < 40
m_integ->setIterator(Newton_Iter);
#endif
m_work.resize(ntmax);
}

View file

@ -89,9 +89,6 @@ CVodesIntegrator::CVodesIntegrator() :
m_type(DENSE+NOJAC),
m_itol(CV_SS),
m_method(CV_BDF),
#if CT_SUNDIALS_VERSION < 40
m_iter(CV_NEWTON),
#endif
m_maxord(0),
m_reltol(1.e-9),
m_abstols(1.e-15),
@ -229,19 +226,6 @@ void CVodesIntegrator::setMaxErrTestFails(int n)
}
}
#if CT_SUNDIALS_VERSION < 40
void CVodesIntegrator::setIterator(IterType t)
{
if (t == Newton_Iter) {
m_iter = CV_NEWTON;
} else if (t == Functional_Iter) {
m_iter = CV_FUNCTIONAL;
} else {
throw CanteraError("CVodesIntegrator::setIterator", "unknown iterator");
}
}
#endif
void CVodesIntegrator::sensInit(double t0, FuncEval& func)
{
m_np = func.nparams();
@ -303,7 +287,7 @@ void CVodesIntegrator::initialize(double t0, FuncEval& func)
//! CV_BDF - Use BDF methods
//! CV_NEWTON - use Newton's method
#if CT_SUNDIALS_VERSION < 40
m_cvode_mem = CVodeCreate(m_method, m_iter);
m_cvode_mem = CVodeCreate(m_method, CV_NEWTON);
#else
m_cvode_mem = CVodeCreate(m_method);
#endif

View file

@ -28,9 +28,6 @@ ReactorNet::ReactorNet() :
// numerically, and use a Newton linear iterator
m_integ->setMethod(BDF_Method);
m_integ->setProblemType(DENSE + NOJAC);
#if CT_SUNDIALS_VERSION < 40
m_integ->setIterator(Newton_Iter);
#endif
}
void ReactorNet::setInitialTime(double time)