Modified files to get a better agreement with const.

This commit is contained in:
Harry Moffat 2009-03-27 18:24:39 +00:00
parent 2de448e90f
commit b0884a7bad
13 changed files with 42 additions and 48 deletions

View file

@ -184,7 +184,7 @@ namespace Cantera {
/******************* binary diffusion coefficients **************/
void AqueousTransport::getBinaryDiffCoeffs(int ld, doublereal* d) {
void AqueousTransport::getBinaryDiffCoeffs(const int ld, doublereal* const d) {
int i,j;
update_T();
@ -202,7 +202,7 @@ namespace Cantera {
}
void AqueousTransport::getMobilities(doublereal* mobil) {
void AqueousTransport::getMobilities(doublereal* const mobil) {
// this needs to be checked out.
int k;
getMixDiffCoeffs(DATA_PTR(m_spwork));
@ -214,19 +214,19 @@ namespace Cantera {
void AqueousTransport::set_Grad_V(const doublereal* grad_V) {
void AqueousTransport::set_Grad_V(const doublereal* const grad_V) {
for (int a = 0; a < m_nDim; a++) {
m_Grad_V[a] = grad_V[a];
}
}
void AqueousTransport::set_Grad_T(const doublereal* grad_T) {
void AqueousTransport::set_Grad_T(const doublereal* const grad_T) {
for (int a = 0; a < m_nDim; a++) {
m_Grad_T[a] = grad_T[a];
}
}
void AqueousTransport::set_Grad_X(const doublereal* grad_X) {
void AqueousTransport::set_Grad_X(const doublereal* const grad_X) {
int itop = m_nDim * m_nsp;
for (int i = 0; i < itop; i++) {
m_Grad_X[i] = grad_X[i];
@ -270,7 +270,7 @@ namespace Cantera {
* MultiTransport instead. This methods fills out array dt with
* zeros.
*/
void AqueousTransport::getThermalDiffCoeffs(doublereal* dt) {
void AqueousTransport::getThermalDiffCoeffs(doublereal* const dt) {
int k;
for (k = 0; k < m_nsp; k++) {
dt[k] = 0.0;
@ -343,7 +343,7 @@ namespace Cantera {
* This is need to avoid a Nan result in the formula
* below.
*/
void AqueousTransport::getMixDiffCoeffs(doublereal* d) {
void AqueousTransport::getMixDiffCoeffs(doublereal* const d) {
update_T();
update_C();

View file

@ -164,7 +164,7 @@ namespace Cantera {
virtual void getSpeciesViscosities(doublereal* visc)
{ updateViscosity_T(); copy(m_visc.begin(), m_visc.end(), visc); }
virtual void getThermalDiffCoeffs(doublereal* dt);
virtual void getThermalDiffCoeffs(doublereal* const dt);
//! Return the thermal conductivity of the solution
/*!
@ -183,42 +183,42 @@ namespace Cantera {
* @param ld
* @param d
*/
virtual void getBinaryDiffCoeffs(int ld, doublereal* d);
virtual void getBinaryDiffCoeffs(const int ld, doublereal* const d);
//! Get the Mixture diffusion coefficients
/*!
* @param d vector of mixture diffusion coefficients
* units = m2 s-1. length = number of species
*/
virtual void getMixDiffCoeffs(doublereal* d);
virtual void getMixDiffCoeffs(doublereal* const d);
//! Get the Mobilities
/*!
* @param mobil
*/
virtual void getMobilities(doublereal* mobil);
virtual void getMobilities(doublereal* const mobil);
//! Specify the value of the gradient of the voltage
/*!
*
* @param grad_V Gradient of the voltage (length num dimensions);
*/
virtual void set_Grad_V(const doublereal* grad_V);
virtual void set_Grad_V(const doublereal* const grad_V);
//! Specify the value of the gradient of the temperature
/*!
*
* @param grad_V Gradient of the temperature (length num dimensions);
*/
virtual void set_Grad_T(const doublereal* grad_T);
virtual void set_Grad_T(const doublereal* const grad_T);
//! Specify the value of the gradient of the MoleFractions
/*!
*
* @param grad_X Gradient of the mole fractions(length nsp * num dimensions);
*/
virtual void set_Grad_X(const doublereal* grad_X);
virtual void set_Grad_X(const doublereal* const grad_X);
//! Handles the effects of changes in the Temperature, internally
//! within the object.

View file

@ -246,7 +246,7 @@ namespace Cantera {
}
}
void DustyGasTransport::getMultiDiffCoeffs(int ld, doublereal* d) {
void DustyGasTransport::getMultiDiffCoeffs(const int ld, doublereal* const d) {
int i,j;
updateMultiDiffCoeffs();
for (i = 0; i < m_nsp; i++) {

View file

@ -44,7 +44,7 @@ namespace Cantera {
virtual void setParameters(const int type, const int k, const doublereal* const p);
virtual void getMultiDiffCoeffs(int ld, doublereal* d);
virtual void getMultiDiffCoeffs(const int ld, doublereal* const d);
virtual void getMolarFluxes(const doublereal* state1,
const doublereal* state2, doublereal delta,

View file

@ -221,7 +221,7 @@ namespace Cantera {
* @param ld
* @param d
*/
virtual void getBinaryDiffCoeffs(int ld, doublereal* const d);
virtual void getBinaryDiffCoeffs(const int ld, doublereal* const d);
//! Get the Mixture diffusion coefficients
/*!

View file

@ -163,7 +163,7 @@ namespace Cantera {
/******************* binary diffusion coefficients **************/
void MixTransport::getBinaryDiffCoeffs(int ld, doublereal* d) {
void MixTransport::getBinaryDiffCoeffs(const int ld, doublereal* const d) {
int i,j;
update_T();
@ -180,7 +180,7 @@ namespace Cantera {
}
void MixTransport::getMobilities(doublereal* mobil) {
void MixTransport::getMobilities(doublereal* const mobil) {
int k;
getMixDiffCoeffs(DATA_PTR(m_spwork));
doublereal c1 = ElectronCharge / (Boltzmann * m_temp);
@ -226,7 +226,7 @@ namespace Cantera {
* MultiTransport instead. This methods fills out array dt with
* zeros.
*/
void MixTransport::getThermalDiffCoeffs(doublereal* dt) {
void MixTransport::getThermalDiffCoeffs(doublereal* const dt) {
int k;
for (k = 0; k < m_nsp; k++) {
dt[k] = 0.0;
@ -279,7 +279,7 @@ namespace Cantera {
* This is need to avoid a Nan result in the formula
* below.
*/
void MixTransport::getMixDiffCoeffs(doublereal* d) {
void MixTransport::getMixDiffCoeffs(doublereal* const d) {
update_T();
update_C();

View file

@ -66,12 +66,12 @@ namespace Cantera {
/*!
* For this approximation, these are all zero.
*/
virtual void getThermalDiffCoeffs(doublereal* dt);
virtual void getThermalDiffCoeffs(doublereal* const dt);
//! returns the mixture thermal conductivity
virtual doublereal thermalConductivity();
virtual void getBinaryDiffCoeffs(int ld, doublereal* d);
virtual void getBinaryDiffCoeffs(const int ld, doublereal* const d);
//! Mixture-averaged diffusion coefficients [m^2/s].
@ -81,8 +81,8 @@ namespace Cantera {
* This is need to avoid a Nan result in the formula
* below.
*/
virtual void getMixDiffCoeffs(doublereal* d);
virtual void getMobilities(doublereal* mobil);
virtual void getMixDiffCoeffs(doublereal* const d);
virtual void getMobilities(doublereal* const mobil);
virtual void update_T();
virtual void update_C();

View file

@ -345,7 +345,7 @@ namespace Cantera {
/**
* @internal
*/
void MultiTransport::getThermalDiffCoeffs(doublereal* dt) {
void MultiTransport::getThermalDiffCoeffs(doublereal* const dt) {
solveLMatrixEquation();
const doublereal c = 1.6/GasConstant;
@ -682,7 +682,7 @@ namespace Cantera {
}
}
void MultiTransport::getMultiDiffCoeffs(int ld, doublereal* d) {
void MultiTransport::getMultiDiffCoeffs(const int ld, doublereal* const d) {
int i,j;
doublereal p = pressure_ig();
@ -720,7 +720,7 @@ namespace Cantera {
}
void MultiTransport::getMixDiffCoeffs(doublereal* d) {
void MultiTransport::getMixDiffCoeffs(doublereal* const d) {
// update the mole fractions
updateTransport_C();

View file

@ -88,14 +88,14 @@ namespace Cantera {
virtual doublereal viscosity();
virtual void getSpeciesViscosities(doublereal* visc)
virtual void getSpeciesViscosities(doublereal* const visc)
{ updateViscosity_T(); std::copy(m_visc.begin(), m_visc.end(), visc); }
virtual void getThermalDiffCoeffs(doublereal* dt);
virtual void getThermalDiffCoeffs(doublereal* const dt);
virtual doublereal thermalConductivity();
virtual void getBinaryDiffCoeffs(int ld, doublereal* d);
virtual void getMultiDiffCoeffs(int ld, doublereal* d);
virtual void getBinaryDiffCoeffs(const int ld, doublereal* const d);
virtual void getMultiDiffCoeffs(const int ld, doublereal* const d);
//! Although this class implements a multicomponent diffusion
//! model, it is convenient to be able to compute
@ -104,7 +104,7 @@ namespace Cantera {
* @param d Mixture averaged diffusion coefficients
* Length = m_msp, units = m2/sec
*/
virtual void getMixDiffCoeffs(doublereal* d);
virtual void getMixDiffCoeffs(doublereal* const d);
//! Get the species diffusive mass fluxes wrt to
//! the mass averaged velocity,

View file

@ -59,7 +59,7 @@ namespace Cantera {
* Compute the mobilities of the species from the diffusion coefficients,
* using the Einstein relation.
*/
void SolidTransport::getMobilities(doublereal* mobil) {
void SolidTransport::getMobilities(doublereal* const mobil) {
int k;
getMixDiffCoeffs(mobil);
doublereal t = m_thermo->temperature();
@ -92,7 +92,7 @@ namespace Cantera {
* which parameters have been specified using method
* setParameters.
*/
void SolidTransport::getMixDiffCoeffs(doublereal* d) {
void SolidTransport::getMixDiffCoeffs(doublereal* const d) {
doublereal temp = m_thermo->temperature();
int nsp = m_thermo->nSpecies();
int k;

View file

@ -49,8 +49,8 @@ virtual ~SolidTransport() {}
virtual int model() { return cSolidTransport; }
virtual doublereal thermalConductivity();
virtual void getMixDiffCoeffs(doublereal* d);
virtual void getMobilities(doublereal* mobil);
virtual void getMixDiffCoeffs(doublereal* const d);
virtual void getMobilities(doublereal* const mobil);
virtual void setParameters(const int n, const int k, const doublereal* const p);
friend class TransportFactory;

View file

@ -184,7 +184,7 @@ namespace Cantera {
* the species in array \c mobil. The array must be
* dimensioned at least as large as the number of species.
*/
virtual void getMobilities(doublereal* mobil)
virtual void getMobilities(doublereal* const mobil)
{ err("getMobilities"); }
@ -258,14 +258,14 @@ namespace Cantera {
* diffusion coefficients. Dimension dt at least as large as
* the number of species.
*/
virtual void getThermalDiffCoeffs(doublereal* dt)
virtual void getThermalDiffCoeffs(doublereal* const dt)
{ err("getThermalDiffCoeffs"); }
/**
* Binary diffusion coefficients [m^2/s].
*/
virtual void getBinaryDiffCoeffs(int ld, doublereal* d)
virtual void getBinaryDiffCoeffs(const int ld, doublereal* const d)
{ err("getBinaryDiffCoeffs"); }
@ -275,7 +275,7 @@ namespace Cantera {
* model, then this method returns the array of multicomponent
* diffusion coefficients. Otherwise it throws an exception.
*/
virtual void getMultiDiffCoeffs(int ld, doublereal* d)
virtual void getMultiDiffCoeffs(const int ld, doublereal* const d)
{ err("getMultiDiffCoeffs"); }
@ -286,7 +286,7 @@ namespace Cantera {
* mixture-averaged diffusion coefficients. Otherwise it
* throws an exception.
*/
virtual void getMixDiffCoeffs(doublereal* d)
virtual void getMixDiffCoeffs(doublereal* const d)
{ err("getMixDiffCoeffs"); }

View file

@ -1,6 +0,0 @@
#include "TransportFactory.cpp"
#include "MixTransport.cpp"
#include "MultiTransport.cpp"
#include "MMCollisionInt.cpp"
#include "SolidTransport.cpp"
#include "DustyGasTransport.cpp"