src/cdi_analytic/Analytic_MultigroupOpacity.cc
Analytic_MultigroupOpacity::sf_char Analytic_MultigroupOpacity::pack() const {
  // make a packer
  rtt_dsxx::Packer packer;

  // now add up the total size; number of groups + 1 int for number of groups,
  // number of models + size in each model + models, 1 int for reaction type,
  // 1 int for model type
  Check(3 * sizeof(int) + group_boundaries.size() * sizeof(double) < INT_MAX);
  int size = static_cast<int>(3 * sizeof(int) + group_boundaries.size() * sizeof(double));

  // make a char array
  sf_char packed(size);

  // set the buffer
  packer.set_buffer(size, &packed[0]);

  // pack the number of groups and group boundaries
  packer << static_cast<int>(group_boundaries.size());
  for (auto &gb : group_boundaries)
    packer << gb;

  // now pack the reaction and model type
  packer << static_cast<int>(reaction) << static_cast<int>(model);

  Ensure(packer.get_ptr() == &packed[0] + size);
  return packed;
}
//------------------------------------------------------------------------------------------------//
/*!
 * \brief Pack an analytic multigroup opacity.
 *
 * This function will pack up the Analytic_Mulitgroup_Opacity into a char array
 * (represented by a vector<char>).  The Analytic_Opacity_Model derived class
 * must have a pack function; this is enforced by the virtual
 * Analytic_Opacity_Model base class.
 */
\brief Pack an analytic multigroup opacity.
This function will pack up the Analytic_Mulitgroup_Opacity into a char array
(represented by a vector).  The Analytic_Opacity_Model derived class
must have a pack function; this is enforced by the virtual
Analytic_Opacity_Model base class.
\ brief Pack an analytic multigroup opacity . This function will pack up the Analytic_Mulitgroup_Opacity into a char array ( represented by a vector ) . The Analytic_Opacity_Model derived class must have a pack function ; this is enforced by the virtual Analytic_Opacity_Model base class .
Analytic_MultigroupOpacity::sf_char Analytic_MultigroupOpacity::pack() const {
  rtt_dsxx::Packer packer;
  Check(3 * sizeof(int) + group_boundaries.size() * sizeof(double) < INT_MAX);
  int size = static_cast<int>(3 * sizeof(int) + group_boundaries.size() * sizeof(double));
  sf_char packed(size);
  packer.set_buffer(size, &packed[0]);
  packer << static_cast<int>(group_boundaries.size());
  for (auto &gb : group_boundaries)
    packer << gb;
  packer << static_cast<int>(reaction) << static_cast<int>(model);
  Ensure(packer.get_ptr() == &packed[0] + size);
  return packed;
}
Analytic_MultigroupOpacity :: sf_char Analytic_MultigroupOpacity :: pack ( ) const { rtt_dsxx :: Packer packer ; Check ( 3 * sizeof ( int ) + group_boundaries . size ( ) * sizeof ( double ) < INT_MAX ) ; int size = static_cast < int > ( 3 * sizeof ( int ) + group_boundaries . size ( ) * sizeof ( double ) ) ; sf_char packed ( size ) ; packer . set_buffer ( size , & packed [ 0 ] ) ; packer << static_cast < int > ( group_boundaries . size ( ) ) ; for ( auto & gb : group_boundaries ) packer << gb ; packer << static_cast < int > ( reaction ) << static_cast < int > ( model ) ; Ensure ( packer . get_ptr ( ) == & packed [ 0 ] + size ) ; return packed ; }
\brief Pack an analytic multigroup opacity.
\ brief Pack an analytic multigroup opacity .
// make a packer // now add up the total size; number of groups + 1 int for number of groups, // number of models + size in each model + models, 1 int for reaction type, // 1 int for model type // make a char array // set the buffer // pack the number of groups and group boundaries // now pack the reaction and model type