projects/biogears/src/engine/Systems/Tissue.cpp
void Tissue::ManageSubstancesAndSaturation()
{
  SEScalarMassPerVolume albuminConcentration;
  albuminConcentration.SetValue(45.0, MassPerVolumeUnit::g_Per_L);
  // Currently, substances are not where they need to be, we will hard code this for now until we fix them
  /// \todo Remove SetBodyState hardcode and replace with computed values after substance redux is complete
  m_data.GetSaturationCalculator().SetBodyState(albuminConcentration,
    m_data.GetBloodChemistry().GetHematocrit(),
    m_data.GetEnergy().GetCoreTemperature(),
    m_data.GetBloodChemistry().GetStrongIonDifference(),
    m_data.GetBloodChemistry().GetPhosphate());
  for (SELiquidCompartment* cmpt : m_data.GetCompartments().GetVascularLeafCompartments()) {
    if (cmpt->HasVolume()) {
      m_data.GetSaturationCalculator().CalculateBloodGasDistribution(*cmpt);
    }
  }
}
//--------------------------------------------------------------------------------------------------
/// \brief
/// Sets body state with regard to some substances and manages blood gas distribution
///
/// \details
/// Until substance fidelity is improved, some values for blood pH are hardcoded. This funciton
/// also manages the calls to blood gas distribution so it doesn't clutter up Process().
//--------------------------------------------------------------------------------------------------
\brief
Sets body state with regard to some substances and manages blood gas distribution

\details
Until substance fidelity is improved, some values for blood pH are hardcoded. This funciton
also manages the calls to blood gas distribution so it doesn't clutter up Process().
\ brief Sets body state with regard to some substances and manages blood gas distribution \ details Until substance fidelity is improved some values for blood pH are hardcoded . This funciton also manages the calls to blood gas distribution so it doesn ' t clutter up Process () .
void Tissue::ManageSubstancesAndSaturation()
{
  SEScalarMassPerVolume albuminConcentration;
  albuminConcentration.SetValue(45.0, MassPerVolumeUnit::g_Per_L);
  m_data.GetSaturationCalculator().SetBodyState(albuminConcentration,
    m_data.GetBloodChemistry().GetHematocrit(),
    m_data.GetEnergy().GetCoreTemperature(),
    m_data.GetBloodChemistry().GetStrongIonDifference(),
    m_data.GetBloodChemistry().GetPhosphate());
  for (SELiquidCompartment* cmpt : m_data.GetCompartments().GetVascularLeafCompartments()) {
    if (cmpt->HasVolume()) {
      m_data.GetSaturationCalculator().CalculateBloodGasDistribution(*cmpt);
    }
  }
}
void Tissue :: ManageSubstancesAndSaturation ( ) { SEScalarMassPerVolume albuminConcentration ; albuminConcentration . SetValue ( 45.0 , MassPerVolumeUnit :: g_Per_L ) ; m_data . GetSaturationCalculator ( ) . SetBodyState ( albuminConcentration , m_data . GetBloodChemistry ( ) . GetHematocrit ( ) , m_data . GetEnergy ( ) . GetCoreTemperature ( ) , m_data . GetBloodChemistry ( ) . GetStrongIonDifference ( ) , m_data . GetBloodChemistry ( ) . GetPhosphate ( ) ) ; for ( SELiquidCompartment * cmpt : m_data . GetCompartments ( ) . GetVascularLeafCompartments ( ) ) { if ( cmpt -> HasVolume ( ) ) { m_data . GetSaturationCalculator ( ) . CalculateBloodGasDistribution ( * cmpt ) ; } } }
\brief
Sets body state with regard to some substances and manages blood gas distribution
\ brief Sets body state with regard to some substances and manages blood gas distribution
// Currently, substances are not where they need to be, we will hard code this for now until we fix them /// \todo Remove SetBodyState hardcode and replace with computed values after substance redux is complete