src/cdi/test/DummyGrayOpacity.cc
/*!
 * \brief Opacity accessor that returns a vector of opacities that correspond to the provided vector
 *        of densities and a single temperature value.
 *
 *     Opacity[i] = temperature[i] + density/1000
 */
\brief Opacity accessor that returns a vector of opacities that correspond to the provided vector
of densities and a single temperature value.

Opacity[i] = temperature[i] + density/1000
\ brief Opacity accessor that returns a vector of opacities that correspond to the provided vector of densities and a single temperature value . Opacity [ i ] = temperature [ i ] + density / 1000
std::vector<double> DummyGrayOpacity::getOpacity(double targetTemperature,
                                                 const std::vector<double> &targetDensity) const {
  std::vector<double> grayOpacity(targetDensity.size());
  for (size_t i = 0; i < targetDensity.size(); ++i)
    grayOpacity[i] = targetTemperature + targetDensity[i] / 1000.0;
  return grayOpacity;
}
std :: vector < double > DummyGrayOpacity :: getOpacity ( double targetTemperature , const std :: vector < double > & targetDensity ) const { std :: vector < double > grayOpacity ( targetDensity . size ( ) ) ; for ( size_t i = 0 ; i < targetDensity . size ( ) ; ++ i ) grayOpacity [ i ] = targetTemperature + targetDensity [ i ] / 1000.0 ; return grayOpacity ; }
\brief Opacity accessor that returns a vector of opacities that correspond to the provided vector
        of densities and a single temperature value.
\ brief Opacity accessor that returns a vector of opacities that correspond to the provided vector of densities and a single temperature value .