Remove some unnecessary temporary references
This commit is contained in:
parent
0e51465722
commit
0ad587f50b
2 changed files with 7 additions and 10 deletions
|
|
@ -1065,7 +1065,6 @@ extern "C" {
|
|||
thermo_t* t = _fth(ith);
|
||||
Kinetics* k = _fkin(ikin);
|
||||
|
||||
Kinetics& kin = *k;
|
||||
XML_Node* x, *r=0;
|
||||
if (root) {
|
||||
r = &root->root();
|
||||
|
|
@ -1081,9 +1080,9 @@ extern "C" {
|
|||
return 0;
|
||||
}
|
||||
importPhase(*x, t);
|
||||
kin.addPhase(*t);
|
||||
kin.init();
|
||||
installReactionArrays(*x, kin, x->id());
|
||||
k->addPhase(*t);
|
||||
k->init();
|
||||
installReactionArrays(*x, *k, x->id());
|
||||
t->setState_TP(300.0, OneAtm);
|
||||
if (r) {
|
||||
if (&x->root() != &r->root()) {
|
||||
|
|
|
|||
|
|
@ -684,8 +684,6 @@ bool importKinetics(const XML_Node& phase, std::vector<ThermoPhase*> th,
|
|||
return false;
|
||||
}
|
||||
|
||||
Kinetics& kin = *k;
|
||||
|
||||
// This phase will be the owning phase for the kinetics operator
|
||||
// For interfaces, it is the surface phase between two volumes.
|
||||
// For homogeneous kinetics, it's the current volumetric phase.
|
||||
|
|
@ -734,8 +732,8 @@ bool importKinetics(const XML_Node& phase, std::vector<ThermoPhase*> th,
|
|||
|
||||
// if no phase with this id has been added to
|
||||
//the kinetics manager yet, then add this one
|
||||
if (kin.phaseIndex(phase_id) == npos) {
|
||||
kin.addPhase(*th[m]);
|
||||
if (k->phaseIndex(phase_id) == npos) {
|
||||
k->addPhase(*th[m]);
|
||||
}
|
||||
}
|
||||
msg += " "+th[m]->id();
|
||||
|
|
@ -749,10 +747,10 @@ bool importKinetics(const XML_Node& phase, std::vector<ThermoPhase*> th,
|
|||
// allocates arrays, etc. Must be called after the phases have
|
||||
// been added to 'kin', so that the number of species in each
|
||||
// phase is known.
|
||||
kin.init();
|
||||
k->init();
|
||||
|
||||
// Install the reactions.
|
||||
return installReactionArrays(phase, kin, owning_phase, check_for_duplicates);
|
||||
return installReactionArrays(phase, *k, owning_phase, check_for_duplicates);
|
||||
}
|
||||
|
||||
bool buildSolutionFromXML(XML_Node& root, const std::string& id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue