[Reactor] Wall coverages may be set using a compositionMap or string

This commit is contained in:
Ray Speth 2015-05-01 12:07:44 -04:00
parent 31491c82cc
commit 0562f18100
2 changed files with 28 additions and 0 deletions

View file

@ -159,6 +159,14 @@ public:
//! (`leftright = 1`) surface to the values in array `cov`.
void setCoverages(int leftright, const doublereal* cov);
//! Set the surface coverages on the left (`leftright = 0`) or right
//! (`leftright = 1`) surface to the values in array `cov`.
void setCoverages(int leftright, const compositionMap& cov);
//! Set the surface coverages on the left (`leftright = 0`) or right
//! (`leftright = 1`) surface to the values in array `cov`.
void setCoverages(int leftright, const std::string& cov);
//! Write the coverages of the left or right surface into array `cov`.
void getCoverages(int leftright, doublereal* cov);

View file

@ -101,6 +101,26 @@ void Wall::setCoverages(int leftright, const doublereal* cov)
}
}
void Wall::setCoverages(int leftright, const compositionMap& cov)
{
m_surf[leftright]->setCoveragesByName(cov);
if (leftright == 0) {
m_surf[0]->getCoverages(&m_leftcov[0]);
} else {
m_surf[1]->getCoverages(&m_rightcov[0]);
}
}
void Wall::setCoverages(int leftright, const std::string& cov)
{
m_surf[leftright]->setCoveragesByName(cov);
if (leftright == 0) {
m_surf[0]->getCoverages(&m_leftcov[0]);
} else {
m_surf[1]->getCoverages(&m_rightcov[0]);
}
}
void Wall::getCoverages(int leftright, doublereal* cov)
{
if (leftright == 0) {