[onedim] Fix order of components

A domain may define extra state entries added after species, where the
appropriate order needs to be maintained.
This commit is contained in:
Ingmar Schoegl 2023-04-11 19:26:21 -05:00 committed by Ray Speth
parent 2f98dd402a
commit 0c6a566d0b

View File

@ -807,7 +807,7 @@ shared_ptr<SolutionArray> StFlow::asArray(const double* soln) const
data[j] = soln[index(i, j)];
}
if (!arr->hasComponent(name)) {
arr->addExtra(name, false); // add to front
arr->addExtra(name, componentIndex(name) > c_offset_Y);
}
value = data;
arr->setComponent(name, value);