File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -710,26 +710,17 @@ RoadRunnerMapping* RoadRunnerIntracellular::find_output_mapping(std::string phys
710710
711711double RoadRunnerIntracellular::get_parameter_value (std::string param_name)
712712{
713- rrc::RRVectorPtr vptr;
714-
715- vptr = rrc::getFloatingSpeciesConcentrations (this ->rrHandle );
716-
717- int offset = species_result_column_index[param_name];
718- double res = vptr->Data [offset];
719- rrc::freeVector (vptr);
720- return res;
713+ double return_value = 0.0 ;
714+ rrc::getFloatingSpeciesByIndex (this ->rrHandle , species_result_column_index[param_name], &return_value);
715+ return return_value;
721716}
722717
723718// rwh: might consider doing a multi-[species_name, value] "set" method
719+ // vn: Actually its better that way. In case there is a species which is linked to an assignment rule,
720+ // we can't use the setFloatingSpecies method without getting an error message, which breaks the thread-safety.
724721void RoadRunnerIntracellular::set_parameter_value (std::string species_name, double value)
725722{
726- rrc::RRVectorPtr vptr;
727-
728- vptr = rrc::getFloatingSpeciesConcentrations (this ->rrHandle );
729- int idx = species_result_column_index[species_name];
730- vptr->Data [idx] = value;
731- rrc::setFloatingSpeciesConcentrations (this ->rrHandle , vptr);
732- rrc::freeVector (vptr);
723+ rrc::setFloatingSpeciesByIndex (this ->rrHandle , species_result_column_index[species_name], value);
733724}
734725
735726RoadRunnerIntracellular* getRoadRunnerModel (PhysiCell::Phenotype& phenotype) {
You can’t perform that action at this time.
0 commit comments