From f66ea315840b4e2bfb86f522a9467adef89562a9 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 20 Nov 2019 12:48:23 +0000 Subject: [PATCH] TDACChemistryModel: Removed CPU time accumulation between ISAT operations Resolves feature request https://bugs.openfoam.org/view.php?id=3392 Patch contributed by Francesco Contino --- .../TDACChemistryModel/TDACChemistryModel.C | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C index 63accf63c6..09894108a6 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C @@ -647,8 +647,7 @@ Foam::scalar Foam::TDACChemistryModel::solve // (it will either expand the current data or add a new stored point). else { - // Store total time waiting to attribute to add or grow - scalar timeTmp = clockTime_.timeIncrement(); + searchISATCpuTime_ += clockTime_.timeIncrement(); if (reduced) { @@ -656,9 +655,7 @@ Foam::scalar Foam::TDACChemistryModel::solve mechRed_->reduceMechanism(pi, Ti, c, celli); nActiveSpecies += mechRed_->NsSimp(); nAvg++; - scalar timeIncr = clockTime_.timeIncrement(); reduceMechCpuTime_ += timeIncr; - timeTmp += timeIncr; } // Calculate the chemical source terms @@ -695,9 +692,7 @@ Foam::scalar Foam::TDACChemistryModel::solve } { - scalar timeIncr = clockTime_.timeIncrement(); solveChemistryCpuTime_ += timeIncr; - timeTmp += timeIncr; } // If tabulation is used, we add the information computed here to @@ -724,12 +719,12 @@ Foam::scalar Foam::TDACChemistryModel::solve if (growOrAdd) { this->setTabulationResultsAdd(celli); - addNewLeafCpuTime_ += clockTime_.timeIncrement() + timeTmp; + addNewLeafCpuTime_ += clockTime_.timeIncrement(); } else { this->setTabulationResultsGrow(celli); - growCpuTime_ += clockTime_.timeIncrement() + timeTmp; + growCpuTime_ += clockTime_.timeIncrement(); } }