Skip to content

Commit

Permalink
Make heatDistribution vector non-static.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Ahrenkiel authored and Phil Ahrenkiel committed Nov 13, 2023
1 parent 96623e7 commit ea48ee7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/HPWHHeatSources.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,7 @@ void HPWH::HeatSource::addHeat(double externalT_C,double minutesToRun) {
case CONFIG_SUBMERGED:
case CONFIG_WRAPPED:
{
static std::vector<double> heatDistribution;
if (heatDistribution.size() != hpwh->getNumNodes())
heatDistribution.resize(hpwh->getNumNodes());
std::vector<double> heatDistribution(hpwh->getNumNodes());

//calcHeatDist takes care of the swooping for wrapped configurations
calcHeatDist(heatDistribution);
Expand Down

0 comments on commit ea48ee7

Please sign in to comment.