diff --git a/src/dfChemistryModel/pytorchFunctions.H b/src/dfChemistryModel/pytorchFunctions.H index af2c224d3..dfaf439c8 100644 --- a/src/dfChemistryModel/pytorchFunctions.H +++ b/src/dfChemistryModel/pytorchFunctions.H @@ -145,9 +145,9 @@ Foam::scalar Foam::dfChemistryModel::solve_DNN(const DeltaTType &del /*=============================construct solutions=============================*/ std::chrono::steady_clock::time_point start6 = std::chrono::steady_clock::now(); - std::vector outputsVec0(star, star+outputLength[0] * 7); //the float number is sample_length*sample_number - std::vector outputsVec1(star+outputLength[0] * 7, star+outputLength[1] * 7); - std::vector outputsVec2(star+outputLength[1] * 7, star+outputLength[2] * 7); + std::vector outputsVec0(star, star+outputLength[0] * mixture_.nSpecies()); //the float number is sample_length*sample_number + std::vector outputsVec1(star+outputLength[0] * mixture_.nSpecies(), star+outputLength[1] * mixture_.nSpecies()); + std::vector outputsVec2(star+outputLength[1] * mixture_.nSpecies(), star+outputLength[2] * mixture_.nSpecies()); std::vector> results = {outputsVec0, outputsVec1, outputsVec2}; updateSolutionBuffer(solutionBuffer, results, cellIDBuffer, problemCounter); std::chrono::steady_clock::time_point stop6 = std::chrono::steady_clock::now();