diff --git a/src/eos/chemTab.cpp b/src/eos/chemTab.cpp index 7576c7223..1ba2c1b04 100644 --- a/src/eos/chemTab.cpp +++ b/src/eos/chemTab.cpp @@ -157,7 +157,7 @@ void ablate::eos::ChemTab::ChemTabModelComputeFunction(PetscReal density, const // Verified to work 11/7/23 // NOTE: id arg is to index a potentially batched outputValues argument -void ablate::eos::ChemTab::extractModelOutputsAtPoint(const PetscReal density, PetscReal *densityEnergySource, PetscReal *densityProgressVariableSource, PetscReal *densityMassFractions, +void ablate::eos::ChemTab::ExtractModelOutputsAtPoint(const PetscReal density, PetscReal *densityEnergySource, PetscReal *densityProgressVariableSource, PetscReal *densityMassFractions, const std::array &outputValues, size_t id) const { // store physical variables (e.g. souener & mass fractions) float *outputArray; // Dwyer: as counterintuitive as it may be static dependents come second, it did pass its tests! @@ -237,7 +237,7 @@ void ablate::eos::ChemTab::ChemTabModelComputeFunction(const PetscReal density[] // reiterate the same extraction process for each member of the batch for (size_t i = 0; i < batch_size; i++) { - extractModelOutputsAtPoint(density[i], safe_id(densityEnergySource, i), safe_id(densityProgressVariableSource, i), safe_id(densityMassFractions, i), outputValues, i); + ExtractModelOutputsAtPoint(density[i], safe_id(densityEnergySource, i), safe_id(densityProgressVariableSource, i), safe_id(densityMassFractions, i), outputValues, i); } // free allocated vectors @@ -249,19 +249,6 @@ void ablate::eos::ChemTab::ChemTabModelComputeFunction(const PetscReal density[] } } -// void ablate::eos::ChemTab::ChemTabModelComputeFunction(const PetscReal density[], const PetscReal*const*const densityProgressVariables, -// PetscReal** densityEnergySource, PetscReal** densityProgressVariableSource, -// PetscReal** densityMassFractions, size_t n) const { -// // for now we are implementing batch in the same way that single calls happened -// // but testing that this works prepares the api for the real thing! -// for (size_t i=0; i &progressVariables, std::vector &massFractions, PetscReal density) const { if (progressVariables.size() != progressVariablesNames.size()) { throw std::invalid_argument("The Progress variable size is expected to be " + std::to_string(progressVariablesNames.size())); diff --git a/src/eos/chemTab.hpp b/src/eos/chemTab.hpp index 6ce3841aa..c10b68748 100644 --- a/src/eos/chemTab.hpp +++ b/src/eos/chemTab.hpp @@ -53,9 +53,19 @@ class ChemTab : public ChemistryModel, public std::enable_shared_from_this GetFieldTags() const override { return std::vector{ablate::finiteVolume::CompressibleFlowFields::MinusOneToOneRange}; } @@ -90,13 +100,18 @@ class ChemTab : public ChemistryModel, public std::enable_shared_from_this& progressVariables, std::vector& massFractions, PetscReal density = 1.0) const; - // /** - // * helper function to compute the mass fractions = from the mass fractions progress variables - // * @param progressVariables is density*progress - // * @param massFractions - // * @param density allows for this function to be used with density*progress variables - // */ - // void ComputeMassFractions(PetscReal* progressVariables, PetscReal* massFractions, PetscReal density = 1.0) const; - /** * helper function to compute the mass fractions = from the mass fractions progress variables * @param progressVariables is density*progress @@ -229,8 +245,15 @@ class ChemTab : public ChemistryModel, public std::enable_shared_from_this>> GetSolutionFieldUpdates() override; - void extractModelOutputsAtPoint(const PetscReal density, PetscReal* densityEnergySource, PetscReal* densityProgressVariableSource, PetscReal* densityMassFractions, + void ExtractModelOutputsAtPoint(const PetscReal density, PetscReal* densityEnergySource, PetscReal* densityProgressVariableSource, PetscReal* densityMassFractions, const std::array& outputValues, size_t id = 0) const; };