Skip to content

Commit

Permalink
Populate processes.phase with species array.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwfncar committed Oct 24, 2023
1 parent 1d24332 commit eab5c02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions include/micm/configure/camp_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ namespace micm
std::cout << "Parse species_arr_ size " << species_arr_.size() << std::endl;
gas_phase_ = Phase(species_arr_);

for (auto& p : processes_)
{
for (const auto& s : species_arr_)
{
p.phase_.species_.push_back(s);
}
}

return status;
}

Expand Down
4 changes: 2 additions & 2 deletions test/unit/configure/test_camp_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ TEST(SolverConfig, ReadAndParseProcessObjects)
EXPECT_EQ(p.products_.size(), num_products_in_each_process[idx]);
if (num_products_in_each_process[idx] > 0)
EXPECT_EQ(p.products_[0].second, yield_value_of_first_product_in_each_process[idx]);
// EXPECT_EQ(p.phase_.species_.size(), num_phase_in_each_process);
EXPECT_EQ(p.phase_.species_.size(), num_phase_in_each_process);
idx++;
}

Expand Down Expand Up @@ -194,7 +194,7 @@ TEST(SolverConfig, ReadAndParseProcessObjectsfromMZ326)
{
EXPECT_EQ(p.reactants_.size(), num_reactants_in_each_process[idx]);
EXPECT_EQ(p.products_.size(), num_products_in_each_process[idx]);
// EXPECT_EQ(p.phase_.species_.size(), num_phase_in_each_process);
EXPECT_EQ(p.phase_.species_.size(), num_phase_in_each_process);
idx++;
}

Expand Down

0 comments on commit eab5c02

Please sign in to comment.