SELiquidCompartment.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "compartment/fluid/SEFluidCompartment.h"
6 #include "compartment/fluid/SELiquidCompartmentLink.h"
7 #include "compartment/substances/SELiquidSubstanceQuantity.h"
8 #include "substance/SESubstanceTransport.h"
9 
10 class CDM_DECL SELiquidCompartment : public SEFluidCompartment<SELiquidCompartmentLink, SELiquidTransportVertex, SELiquidTransportSubstance, SELiquidSubstanceQuantity>
11 {
12  friend class PBCompartment;//friend the serialization class
13  friend class SETissueCompartment;
14  friend class SECompartmentManager;
16 protected:
17  SELiquidCompartment(const std::string& name, Logger* logger);
18 public:
19  virtual ~SELiquidCompartment();
20 
21  virtual void Clear();
22 
23  virtual const SEScalar* GetScalar(const std::string& name);
24 
25  virtual void StateChange();
26 
27  virtual void Balance(BalanceLiquidBy e);// Balance all substances based on a specific property
28 
29  virtual bool HasPH() const;
30  virtual SEScalar& GetPH();
31  virtual double GetPH() const;
32 
33  virtual bool HasWaterVolumeFraction() const;
34  virtual SEScalar0To1& GetWaterVolumeFraction();
35  virtual double GetWaterVolumeFraction() const;
36 
37  virtual void AddChild(SELiquidCompartment& child);
38  virtual const std::vector<SELiquidCompartment*>& GetChildren() { return m_Children; }
39  virtual const std::vector<SELiquidCompartment*>& GetLeaves() { return m_Leaves; }
40 
41 protected:
42  virtual SELiquidSubstanceQuantity& CreateSubstanceQuantity(SESubstance& substance);
43 
46 
47  std::vector<SELiquidCompartment*> m_Children;
48  std::vector<SELiquidCompartment*> m_Leaves;
49 };
SEScalar0To1 * m_WaterVolumeFraction
Definition: SELiquidCompartment.h:45
Definition: SEScalar.h:19
std::vector< SELiquidCompartment * > m_Children
Definition: SELiquidCompartment.h:47
Definition: Logger.h:61
SEScalar * m_pH
Definition: SELiquidCompartment.h:44
virtual const std::vector< SELiquidCompartment * > & GetLeaves()
Definition: SELiquidCompartment.h:39
Definition: SELiquidSubstanceQuantity.h:11
std::vector< SELiquidSubstanceQuantity * > m_Children
Definition: SELiquidSubstanceQuantity.h:80
std::vector< SELiquidCompartment * > m_Leaves
Definition: SELiquidCompartment.h:48
virtual const std::vector< SELiquidCompartment * > & GetChildren()
Definition: SELiquidCompartment.h:38
Definition: SELiquidCompartment.h:10
Definition: SECompartmentManager.h:24
Definition: SETissueCompartment.h:8
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEFluidCompartment.h:17
virtual void Clear()
virtual void StateChange()=0
friend class SELiquidCompartment
Definition: SELiquidSubstanceQuantity.h:14
Definition: PBCompartment.h:27
Definition: SESubstance.h:14
Definition: SEScalar0To1.h:7
virtual void AddChild(SELiquidSubstanceQuantity &subQ)
Definition: SELiquidSubstanceQuantity.cpp:535
virtual void Balance(BalanceLiquidBy e)
Definition: SELiquidSubstanceQuantity.cpp:121