From 18e515bb9c765ed20116f9d677f5748bc70ffa59 Mon Sep 17 00:00:00 2001 From: Jiwon Gim Date: Tue, 18 Jun 2024 16:05:37 -0600 Subject: [PATCH] add constructor --- include/musica/micm.hpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/include/musica/micm.hpp b/include/musica/micm.hpp index ce433424..3116ffa2 100644 --- a/include/musica/micm.hpp +++ b/include/musica/micm.hpp @@ -14,10 +14,10 @@ #include #include +#include #include #include #include -#include namespace musica { @@ -51,6 +51,30 @@ namespace musica double final_time_{}; /// @brief The final state the solver was in String state_{}; + + SolverStats( + int64_t func_calls, + int64_t jacobian, + int64_t num_steps, + int64_t accepted, + int64_t rejected, + int64_t decompositions, + int64_t solves, + int64_t singular, + double final_time, + String state) + : function_calls_(func_calls), + jacobian_updates_(jacobian), + number_of_steps_(num_steps), + accepted_(accepted), + rejected_(rejected_), + decompositions_(decompositions), + solves_(solves), + singular_(singular), + final_time_(final_time), + state_(state) + { + } }; MICM *CreateMicm(const char *config_path, Error *error); @@ -64,7 +88,7 @@ namespace musica double *concentrations, int num_custom_rate_parameters, double *custom_rate_parameters, - SolverStats* solver_stats, + SolverStats *solver_stats, Error *error); Mapping *GetSpeciesOrdering(MICM *micm, std::size_t *array_size, Error *error); Mapping *GetUserDefinedReactionRatesOrdering(MICM *micm, std::size_t *array_size, Error *error); @@ -102,7 +126,7 @@ namespace musica double *concentrations, int num_custom_rate_parameters, double *custom_rate_parameters, - SolverStats* solver_stats, + SolverStats *solver_stats, Error *error); /// @brief Get the ordering of species