Use size_t instead of int in InterfaceKinetics
This commit is contained in:
parent
8652963e6f
commit
46a8b3052f
2 changed files with 9 additions and 9 deletions
|
|
@ -573,7 +573,7 @@ public:
|
|||
* @param iphase Index of the phase. This is the order within the internal thermo vector object
|
||||
* @param isStable Flag indicating whether the phase is stable or not
|
||||
*/
|
||||
void setPhaseStability(const int iphase, const int isStable);
|
||||
void setPhaseStability(const size_t iphase, const int isStable);
|
||||
|
||||
//! Gets the phase existence int for the ith phase
|
||||
/*!
|
||||
|
|
@ -582,7 +582,7 @@ public:
|
|||
* @return Returns the int specifying whether the kinetics object thinks the phase exists
|
||||
* or not. If it exists, then species in that phase can be a reactant in reactions.
|
||||
*/
|
||||
int phaseExistence(const int iphase) const;
|
||||
int phaseExistence(const size_t iphase) const;
|
||||
|
||||
//! Gets the phase stability int for the ith phase
|
||||
/*!
|
||||
|
|
@ -593,7 +593,7 @@ public:
|
|||
* If it stable, then the kinetics object will allow for rates of production of
|
||||
* of species in that phase that are positive.
|
||||
*/
|
||||
int phaseStability(const int iphase) const;
|
||||
int phaseStability(const size_t iphase) const;
|
||||
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -1371,9 +1371,9 @@ void InterfaceKinetics::setPhaseExistence(const size_t iphase, const int exists)
|
|||
* @return Returns the int specifying whether the kinetics object thinks the phase exists
|
||||
* or not. If it exists, then species in that phase can be a reactant in reactions.
|
||||
*/
|
||||
int InterfaceKinetics::phaseExistence(const int iphase) const
|
||||
int InterfaceKinetics::phaseExistence(const size_t iphase) const
|
||||
{
|
||||
if (iphase < 0 || iphase >= (int) m_thermo.size()) {
|
||||
if (iphase >= m_thermo.size()) {
|
||||
throw CanteraError("InterfaceKinetics:phaseExistence()", "out of bounds");
|
||||
}
|
||||
return m_phaseExists[iphase];
|
||||
|
|
@ -1388,18 +1388,18 @@ int InterfaceKinetics::phaseExistence(const int iphase) const
|
|||
* If it stable, then the kinetics object will allow for rates of production of
|
||||
* of species in that phase that are positive.
|
||||
*/
|
||||
int InterfaceKinetics::phaseStability(const int iphase) const
|
||||
int InterfaceKinetics::phaseStability(const size_t iphase) const
|
||||
{
|
||||
if (iphase < 0 || iphase >= (int) m_thermo.size()) {
|
||||
if (iphase >= m_thermo.size()) {
|
||||
throw CanteraError("InterfaceKinetics:phaseStability()", "out of bounds");
|
||||
}
|
||||
return m_phaseIsStable[iphase];
|
||||
}
|
||||
//================================================================================================
|
||||
|
||||
void InterfaceKinetics::setPhaseStability(const int iphase, const int isStable)
|
||||
void InterfaceKinetics::setPhaseStability(const size_t iphase, const int isStable)
|
||||
{
|
||||
if (iphase < 0 || iphase >= (int) m_thermo.size()) {
|
||||
if (iphase >= m_thermo.size()) {
|
||||
throw CanteraError("InterfaceKinetics:setPhaseStability", "out of bounds");
|
||||
}
|
||||
if (isStable) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue