Doxygen update

Added function documentation.
Added error checking on input
This commit is contained in:
Harry Moffat 2007-06-12 19:39:50 +00:00
parent 235ff2acb5
commit badc82daf3
2 changed files with 95 additions and 1 deletions

View file

@ -2095,11 +2095,74 @@ namespace Cantera {
void counterIJ_setup(void) const;
//! Process an XML node called "binarySaltParameters"
/*!
* This node contains all of the parameters necessary to describe
* the Pitzer model for that particular binary salt.
* This function reads the XML file and writes the coefficients
* it finds to an internal data structures.
*
* @param BinSalt reference to the XML_Node named binarySaltParameters
* containing the
* anion - cation interaction
*/
void readXMLBinarySalt(XML_Node &BinSalt);
//! Process an XML node called "thetaAnion"
/*!
* This node contains all of the parameters necessary to describe
* the binary interactions between two anions.
*
* @param BinSalt reference to the XML_Node named thetaAnion
* containing the
* anion - anion interaction
*/
void readXMLThetaAnion(XML_Node &BinSalt);
//! Process an XML node called "thetaCation"
/*!
* This node contains all of the parameters necessary to describe
* the binary interactions between two cations.
*
* @param BinSalt reference to the XML_Node named thetaCation
* containing the
* cation - cation interaction
*/
void readXMLThetaCation(XML_Node &BinSalt);
//! Process an XML node called "psiCommonAnion"
/*!
* This node contains all of the parameters necessary to describe
* the ternary interactions between one anion and two cations.
*
* @param BinSalt reference to the XML_Node named psiCommonAnion
* containing the
* anion - cation1 - cation2 interaction
*/
void readXMLPsiCommonAnion(XML_Node &BinSalt);
//! Process an XML node called "psiCommonCation"
/*!
* This node contains all of the parameters necessary to describe
* the ternary interactions between one cation and two anions.
*
* @param BinSalt reference to the XML_Node named psiCommonCation
* containing the
* cation - anion1 - anion2 interaction
*/
void readXMLPsiCommonCation(XML_Node &BinSalt);
//! Process an XML node called "lambdaNeutral"
/*!
* This node contains all of the parameters necessary to describe
* the binary interactions between one neutral species and
* any other species (neutral or otherwise) in the mechanism.
*
* @param BinSalt reference to the XML_Node named lambdaNeutral
* containing multiple
* Neutral - species interactions
*/
void readXMLLambdaNeutral(XML_Node &BinSalt);

View file

@ -58,6 +58,11 @@ namespace Cantera {
* it finds to an internal data structures.
*/
void HMWSoln::readXMLBinarySalt(XML_Node &BinSalt) {
string xname = BinSalt.name();
if (xname != "binarySaltParameters") {
throw CanteraError("HMWSoln::readXMLBinarySalt",
"Incorrect name for processing this routine: " + xname);
}
double *charge = DATA_PTR(m_speciesCharge);
string stemp;
int nParamsFound, i;
@ -226,6 +231,11 @@ namespace Cantera {
* the binary interactions between two anions.
*/
void HMWSoln::readXMLThetaAnion(XML_Node &BinSalt) {
string xname = BinSalt.name();
if (xname != "thetaAnion") {
throw CanteraError("HMWSoln::readXMLThetaAnion",
"Incorrect name for processing this routine: " + xname);
}
double *charge = DATA_PTR(m_speciesCharge);
string stemp;
string iName = BinSalt.attrib("anion1");
@ -281,6 +291,11 @@ namespace Cantera {
* the binary interactions between two cation.
*/
void HMWSoln::readXMLThetaCation(XML_Node &BinSalt) {
string xname = BinSalt.name();
if (xname != "thetaCation") {
throw CanteraError("HMWSoln::readXMLThetaCation",
"Incorrect name for processing this routine: " + xname);
}
double *charge = DATA_PTR(m_speciesCharge);
string stemp;
string iName = BinSalt.attrib("cation1");
@ -336,6 +351,11 @@ namespace Cantera {
* the binary interactions between two anions and one common cation.
*/
void HMWSoln::readXMLPsiCommonCation(XML_Node &BinSalt) {
string xname = BinSalt.name();
if (xname != "psiCommonCation") {
throw CanteraError("HMWSoln::readXMLPsiCommonCation",
"Incorrect name for processing this routine: " + xname);
}
double *charge = DATA_PTR(m_speciesCharge);
string stemp;
string kName = BinSalt.attrib("cation");
@ -424,6 +444,11 @@ namespace Cantera {
* the binary interactions between two cations and one common anion.
*/
void HMWSoln::readXMLPsiCommonAnion(XML_Node &BinSalt) {
string xname = BinSalt.name();
if (xname != "psiCommonAnion") {
throw CanteraError("HMWSoln::readXMLPsiCommonAnion",
"Incorrect name for processing this routine: " + xname);
}
double *charge = DATA_PTR(m_speciesCharge);
string stemp;
string kName = BinSalt.attrib("anion");
@ -510,6 +535,11 @@ namespace Cantera {
* any other species (neutral or otherwise) in the mechanism.
*/
void HMWSoln::readXMLLambdaNeutral(XML_Node &BinSalt) {
string xname = BinSalt.name();
if (xname != "lambdaNeutral") {
throw CanteraError("HMWSoln::readXMLLanbdaNeutral",
"Incorrect name for processing this routine: " + xname);
}
double *charge = DATA_PTR(m_speciesCharge);
string stemp;
string iName = BinSalt.attrib("neutral");
@ -547,7 +577,8 @@ namespace Cantera {
m_Lambda_ij(iSpecies,jSpecies) = atofCheck(stemp.c_str());
if (old != 0.0) {
if (old != m_Lambda_ij(iSpecies,jSpecies)) {
throw CanteraError("HMWSoln::readXMLLambdaNeutral", "conflicting values");
throw CanteraError("HMWSoln::readXMLLambdaNeutral",
"conflicting values");
}
}
}