Error message printed by Plog::validate now indicates the problematic reaction
This commit is contained in:
parent
ead04df741
commit
16462628a7
1 changed files with 6 additions and 5 deletions
|
|
@ -537,7 +537,7 @@ public:
|
|||
Ea2_.resize(maxRates_);
|
||||
|
||||
if (rdata.validate) {
|
||||
validate();
|
||||
validate(rdata);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -629,7 +629,7 @@ public:
|
|||
//! temperatures at each interpolation pressure. This is potentially an
|
||||
//! issue when one of the Arrhenius expressions at a particular pressure
|
||||
//! has a negative pre-exponential factor.
|
||||
void validate() {
|
||||
void validate(const ReactionData& rdata) {
|
||||
double T[] = {1.0, 10.0, 100.0, 1000.0, 10000.0};
|
||||
for (pressureIter iter = pressures_.begin();
|
||||
iter->first < 1000;
|
||||
|
|
@ -643,9 +643,10 @@ public:
|
|||
// message will correctly indicate that the problematic rate
|
||||
// expression is at the higher of the adjacent pressures.
|
||||
throw CanteraError("Plog::validate",
|
||||
"Invalid rate coefficient at P = " +
|
||||
fp2str(exp((++iter)->first)) +
|
||||
", T = " + fp2str(T[i]));
|
||||
"Invalid rate coefficient for reaction #" +
|
||||
int2str(rdata.number) + ":\n" + rdata.equation + "\n" +
|
||||
"at P = " + fp2str(exp((++iter)->first)) +
|
||||
", T = " + fp2str(T[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue