Skip to content

Commit 509a28e

Browse files
committed
[oneD] Prevent compiler warning
1 parent 49c320b commit 509a28e

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

include/cantera/oneD/Flow1D.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,12 @@ class Flow1D : public Domain1D
542542
virtual void evalElectricField(double* x, double* rsd, int* diag,
543543
double rdt, size_t jmin, size_t jmax);
544544

545+
//! Alternate version of evalContinuity with legacy signature.
546+
//! Implemented by StFlow; included here to prevent compiler warnings about shadowed
547+
//! virtual functions.
548+
//! @deprecated To be removed after Cantera 3.0.
549+
virtual void evalContinuity(size_t j, double* x, double* r, int* diag, double rdt);
550+
545551
/**
546552
* Evaluate the oxidizer axial velocity equation residual.
547553
*

include/cantera/oneD/StFlow.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ class StFlow : public Flow1D
4343
//! Evaluate all residual components at the right boundary.
4444
virtual void evalRightBoundary(double* x, double* res, int* diag, double rdt);
4545

46-
//! Evaluate the residual corresponding to the continuity equation at all
47-
//! interior grid points.
48-
virtual void evalContinuity(size_t j, double* x, double* r, int* diag, double rdt);
46+
void evalContinuity(size_t j, double* x, double* r, int* diag, double rdt) override;
4947

5048
protected:
5149
double wdot(size_t k, size_t j) const {

src/oneD/Flow1D.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,12 @@ void Flow1D::evalElectricField(double* x, double* rsd, int* diag,
677677
}
678678
}
679679

680+
void Flow1D::evalContinuity(size_t j, double* x, double* rsd, int* diag, double rdt)
681+
{
682+
throw CanteraError("Flow1D::evalContinuity",
683+
"Overloaded by StFlow; to be removed after Cantera 3.0");
684+
}
685+
680686
void Flow1D::updateTransport(double* x, size_t j0, size_t j1)
681687
{
682688
if (m_do_multicomponent) {

0 commit comments

Comments
 (0)