diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/ReactionI.H b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/ReactionI.H index 6dece80ba..55287cbfd 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/ReactionI.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/ReactionI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,9 +67,8 @@ Reaction::rhs() const template inline Ostream& operator<<(Ostream& os, const Reaction& r) { - OStringStream reaction; - os << r.reactionStr(reaction)<< token::END_STATEMENT <& carr ) { - os << token::BEGIN_LIST - << carr.k0_ << token::SPACE << carr.kInf_ << token::SPACE << carr.F_ - << token::END_LIST; + carr.write(os); return os; } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H index 0b7fa5f03..fff348d48 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H @@ -120,12 +120,7 @@ inline Foam::Ostream& Foam::operator<< const FallOffReactionRate& forr ) { - os << token::BEGIN_LIST - << forr.k0_ << token::SPACE - << forr.kInf_ << token::SPACE - << forr.F_ << token::SPACE - << forr.thirdBodyEfficiencies_ - << token::END_LIST; + forr.write(os); return os; } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H index 055d6291d..cc76c2c2c 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H @@ -104,16 +104,7 @@ inline Foam::Ostream& Foam::operator<< const JanevReactionRate& jrr ) { - os << token::BEGIN_LIST - << jrr.A_ << token::SPACE << jrr.beta_ << token::SPACE << jrr.Ta_; - - for (int n=0; n(arr) - << token::SPACE << arr.thirdBodyEfficiencies_ - << token::END_LIST; + arr.write(os); return os; } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H index d77df740b..97a0e8eee 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H @@ -114,53 +114,7 @@ inline Foam::Ostream& Foam::operator<< const thirdBodyEfficiencies& tbes ) { - scalarList orderedTbes = tbes; - sort(orderedTbes); - - scalar val = orderedTbes[0]; - label count = 1; - - scalar valMaxCount = val; - label maxCount = 1; - - for (label i=1; i maxCount) - { - maxCount = count; - valMaxCount = val; - } - - count = 1; - val = orderedTbes[i]; - } - } - - if (count > maxCount) - { - maxCount = count; - valMaxCount = val; - } - - os << token::BEGIN_LIST << valMaxCount; - - forAll(tbes, i) - { - if (notEqual(tbes[i], valMaxCount)) - { - os << token::SPACE << tbes.species_[i] - << token::SPACE << tbes[i]; - } - } - - os << token::END_LIST; - + tbes.write(os); return os; }