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

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.