added const in restoreState
This commit is contained in:
parent
b7a27b183a
commit
22f35f2e8a
2 changed files with 7 additions and 6 deletions
|
|
@ -26,11 +26,11 @@ namespace Cantera {
|
|||
getMassFractions(state + 2);
|
||||
}
|
||||
|
||||
void Phase::restoreState(vector_fp& state) {
|
||||
void Phase::restoreState(const vector_fp& state) {
|
||||
restoreState(state.size(),state.begin());
|
||||
}
|
||||
|
||||
void Phase::restoreState(int lenstate, doublereal* state) {
|
||||
void Phase::restoreState(int lenstate, const doublereal* state) {
|
||||
if (int(lenstate) >= nSpecies() + 2) {
|
||||
setMassFractions_NoNorm(state + 2);
|
||||
setTemperature(state[0]);
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ namespace Cantera {
|
|||
/**
|
||||
* Restore a state saved on a previous call to saveState.
|
||||
*/
|
||||
void restoreState(vector_fp& state);
|
||||
void restoreState(const vector_fp& state);
|
||||
|
||||
void restoreState(int lenstate, doublereal* state);
|
||||
void restoreState(int lenstate, const doublereal* state);
|
||||
|
||||
/**
|
||||
* Set the species mole fractions by name.
|
||||
|
|
@ -185,8 +185,9 @@ namespace Cantera {
|
|||
*/
|
||||
int m_kk;
|
||||
/**
|
||||
* m_ndim is the dimensionality of the phase. Basically, volumetric phases
|
||||
* have dimensionality 3 and surface phases have dimensionality 2.
|
||||
* m_ndim is the dimensionality of the phase.
|
||||
* Volumetric phases have dimensionality 3 and surface phases
|
||||
* have dimensionality 2.
|
||||
*/
|
||||
int m_ndim;
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue